[Solved] Extract a specific number from a text

waleed

New member
Hey,

i want to extract the only numbers after text "مرجع العملية" until it reaches (space " ") only as described in picture
i have tried Textafter & Textbefore but couldn't make it, note that each cell has the number after "مرجع العملية"
not fixed which means it maybe 10 digits or more or less
 

Attachments

  • Screenshot 2024-09-26 134449.png
    Screenshot 2024-09-26 134449.png
    11.4 KB · Views: 2
Hello Waleed,

To extract the numbers after the text "مرجع العملية", you can use a combination of TEXTBEFORE, and TEXTAFTER functions.

=TEXTBEFORE(TEXTAFTER(A1, "مرجع العملية"), " ")
  • TEXTAFTER(A1, "مرجع العملية"): Extracts the text after "مرجع العملية".
  • TEXTBEFORE(..., " "): Extracts the text before the first space, giving you the numeric part.
  • If these functions aren't available, or for earlier versions of Excel, you might need to use SEARCH and MID functions in combination to find and extract the numeric portion.
 
thank you for your response, i have added a space like =TEXTBEFORE(TEXTAFTER(A1, "مرجع العملية "), " ")
and it worked! thank you! I've been struggling for days!
 
You're most welcome! I'm glad to hear that it worked for you! Feel free to reach out if you run into any other issues. Keep helping each other to make the ExcelDemy forum beneficial for all.
 

Online statistics

Members online
0
Guests online
8
Total visitors
8

Forum statistics

Threads
363
Messages
1,589
Members
679
Latest member
KeviseRak
Back
Top