Comments on: How to extract number from string in Excel

To extract number from string in Excel, it'd take a little ingenuity, a bit of patience, and a bunch of different functions nested into each other. Or, you can run the Extract tool and have the job done with a mouse click. Continue reading

Comments page 6. Total comments: 575

  1. Hi, how to extract numbers in middle of Unicode strings, example "2 – 이 (i)"? Thanks Ahead!

  2. 5KM (1) Back to Basics
    >21KM Sky's the Limit

    Hi, I'm amazed by Sir Alexander's superb excel skills. I'm just trying out my luck here hopefully sir can solve my problem. I would like to extract only the number '5' and '21'. I wonder it is possible. Thank you.

    1. Hello!
      Press CTRL + H. In the "Find what" field, write (*). Do not write anything in the "Replace with" field. Click "Replace".
      Then use the formula from this article and comments. For example:

      =TEXTJOIN("",TRUE,IFERROR(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)*1,""))

      I hope I answered your question.

  3. Hi,

    I have a spreadsheet of thousands in the following format
    1. zvsnsnshs 2020DDE542134
    2. sgenemene2020SHB6721
    3. reenmennee 2020RTY409

    I want to extract 2020DDE542134 in 1, 2020SHB6721 in 2 and 2020RTY409 in 3

    2020 is followed by three letters but the number of digits thereafter vary.

    Please assist.

    1. Hello!
      The formula below will do the trick for you:

      =MID(A1,SEARCH("2020",A1,1),100)

      I hope it’ll be helpful.

  4. I use this to get numbers only from mixed Alpha Numeric strings
    TEXTJOIN(“”,TRUE,IFERROR(MID(A2,ROW(INDIRECT(“1:”&LEN(A2))),1)*1,””))

  5. Amazing formula and explanation. Thank you very much!

  6. Hello,
    How can i remove last numeric digit from a text numeric string e.g.

    abc, adi, 23 fhve sihf ghr 98000

  7. Thank you for this amazing formula!

    =SUMPRODUCT(MID(0&A2, LARGE(INDEX(ISNUMBER(--MID(A2, ROW(INDIRECT("1:"&LEN(A2))), 1)) * ROW(INDIRECT("1:"&LEN(A2))), 0), ROW(INDIRECT("1:"&LEN(A2))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(A2)))/10)

    It works almost perfectly, however I would like to separate the different number sets with a space.
    e.g.
    returned value with formula: 5468751013
    desired return value: 546875 1 0 13 (number sets vary)

    Regards
    Donald

    1. Hello!
      If you want to extract groups of numbers from the text and separate them with a space, use this formula:

      =SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(A2,ROW($1:$94),1)),MID(A2,ROW($1:$94),1)," ")))," "," ")

      Hope this is what you need.

      1. Wow! That worked perfectly!

        Greatly appreciate this support!

  8. I find this thread quite amazing.

    What I offer below may be a solution to a one-off problem as no-one else describes anything similar. But perhaps I am not the only one so here goes.

    When I scraped a table from the following site:

    https://en.wikipedia.org/wiki/List_of_countries_by_net_migration_rate

    - I found columns of numbers displayed in Excel as either regular positive numbers, aligned right, or negative numbers as text, aligned left. I tried all the techniques recommended for converting text to number but nothing worked. So in frustration I converted them all manually, hardly a practical solution for a large database.

    Then it dawned on me that it must be the actual "-" character which was causing the problem. I discovered there are online Unicode character identifiers, one of which I used to identify how these negative characters were different. The "-" for a regular negative number identified as "U+002D : HYPHEN-MINUS {hyphen or minus sign}". The problem character identified as "U+2212 : MINUS SIGN". When I used Ctrl-H, find and replace-all in Excel, all the negative text numbers instantly converted to regular numbers, aligned right, no further action needed.

  9. BR_GID/908764_JK2

    what is the formula to get only 908764 number .

    1. Hi,
      Please check the formula below, it should work for you:

      =LEFT(SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(A1,ROW($1:$94),1)), MID(A1,ROW($1:$94),1)," ")))," ","-"), SEARCH("-",SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(A1,ROW($1:$94),1)), MID(A1,ROW($1:$94),1)," ")))," ","-"),1)-1)

      I hope it’ll be helpful.

  10. Hi,

    I have a spreadsheet of a couple of thousand lot plans in the format of
    103SP122202
    10SP133260
    1RP43701
    They are always numbers followed by letters followed by numbers.
    I am looking for a formula to return all the numbers before the first letter and place in a column
    103
    10
    1
    Then a formula to return all the letters, and the numbers after the letters to place in another column
    SP122202
    SP133260
    1RP43701
    how would i achieve this?

    1. Hello!
      Write your value in cell A1. To extract the text, write the formula in B1.

      =SUBSTITUTE((CONCAT(IF(NOT(ISNUMBER(--MID(A1,ROW($1:$94),1))), MID(A1,ROW($1:$94),1),"")))," ","")

      To extract the first number, write the formula in C1.

      =LEFT(A1,SEARCH(B1,A1,1)-1)

      To extract the second number, write the formula in D1.

      =RIGHT(A1,LEN(A1)-SEARCH(B1,A1,1)-1)

      I hope I answered your question. If something is still unclear, please feel free to ask.

      1. Hi Alexander,

        Thank you very much for replying with a solution, it works very well.

        Is it possible to alter =RIGHT(A1,LEN(A1)-SEARCH(B1,A1,1)-1) to keep SP122202 together in a cell and not separated?

        Regards
        Andrew

        1. Hi,
          Please try the following formula:

          =B1&RIGHT(A1,LEN(A1)-SEARCH(B1,A1,1)-1)

          or

          =RIGHT(A1,LEN(A1)-SEARCH(B1,A1,1)+1)

          1. Hi,
            The second formula worked perfectly,
            Thank you very much.

            Regards
            Andrew

  11. I've been an advanced Excel user for 10+ years. It's pretty rare these days but when I hit a wall I eventually search for something online and I'm amazed, how many of those times I've ended up on one of Svetlana's posts, like 50+. I'm a big fan of hers! Joshua

  12. Hi Team,

    I want below number to be extract from below given sentence.

    Q. 1 : "GL CASH DIPOSITED DONE BY ONE DATE IS 05/10/2020 02771600241 [AccountID: 123456767"

    I want the answer should be "02771600241"

    Q2: CASH DEPOSITED IN TRANSACTION ID - 02801900536 [AccountID: 1257895333 Account Name: Cas

    I want the answer should be " 02801900536 "

    1. Hi,
      If I got you right, the formula below will help you with your task:

      =TRIM(RIGHT(SUBSTITUTE(TRIM(RIGHT(SUBSTITUTE(LEFT(A1,SEARCH(" [",A1,1)),"-",REPT(" ",20)),20))," ",REPT(" ",20)),20))

  13. What if I have multiple potential phone numbers in a free-form field and want them to extract, but be separated by a delimiter? Working from a DB extract where the most useful phone numbers are entered free-form with other miscellaneous tidbits like this:

    UserName 1234567890 Location 0987654321 OtherInfo
    OtherInfo 1234567890 Location
    M 1234567890 C 0987654321
    Location 1234567890 0987654321

    While your formula works great for extracting the numbers, it's resulting in strings like this now 12345678900987654321, which I would then need to split back up. Not all #s are 10 digits. Some have only 7 and others are international.

  14. Thanks for the formula, its really helpful and time saving

  15. Hi,

    If i need to do the sum of the below 2 columns which has number and a percentage in same cell, how do i do this?
    Could you please help. Thanks a lot.

    4 (100%)
    5 (83%)

      1. Thank you for replying.
        COlumn A Column B
        Total test runs Total test executed
        4 4 (100%)
        6 5 (83%)
        ------------------------------------------------------
        10 9 (91.66%)
        In column B, I want to get the total no of executed test cases ( 4+5). Also I want to get the average percentage of column B v/s Column A total count.

        1. Hello!
          To convert text string "4 (100%)" to number 4 use the formula

          =--REPLACE(B2,SEARCH("(",B2,1),10,"")

          I hope it’ll be helpful.

  16. Hi Alex,

    Problem description

    TXT_TXN_DESC Required field
    NEFT Cr-UTIB0000231-SIVA C-JANA SMALL FINANCE BANK-AXIR210011779565 AXIR210011779565
    RTGS Cr-HDFC0000240-LIGHTMICROFINANCEPVTLTD-JSFBCollectionAccountMSE-HDFCR52021010166833120 HDFCR52021010166833120
    NEFT SBIN521001912911-Mrs GOPA BHATACHARJEE-JANA SMALL FINANCE BANK LTD SBIN521001912911
    30768647394421 KKBKR52021010200888475 KKBKR52021010200888475
    33598650000698 20210102 IOBAN21002635205 IOBAN21002635205
    30098850001352 P002210081154581 20210102 P002210081154581

    What formula will work for to segregate an UTRNs to new column, please suggest.

    1. Hi,
      What do you want to calculate exactly? Your question is not entirely clear, please specify.
      Is this text from one cell or from several? How do you want to split it? Give an example.

  17. Hi,
    I have used your formula above for extracting numbers from the left of a string [=LEFT(C738,SUM(LEN(C738)-LEN(SUBSTITUTE(C738,{"0","1","2","3","4","5","6","7","8","9"},""))))] but it is not returning the expected result:

    * String - 198503_NA_ST17 9UQ

    * Expected result - 198503

    * Actual result - 198503_NA

    If you could give me any indication as to where I have gone wrong it would be very much appreciated.
    Kind regards,
    Matt

    1. Hello!
      Please try the following formula:

      =LEFT(A2,MATCH(FALSE,ISNUMBER(--MID(A2,ROW($1:$94),1)),0)-1)

      Hope this is what you need.

      1. Hi Alexander,
        Thanks for your help but unfortunately that is returning #N/A.

        I changed the cell reference to C113 to suit where I am extracting the data from (I am extracting it into cell A113) and changed ROW references to $5:$475 as those are the rows my full data set sits in.

        Have I gone wrong somewhere making those changes? I tried it without changing the ROW references but it still returns #N/A.

        Thanks again for your help.
        Matt

        1. Hi,
          No need to change absolute references.

          =LEFT(C113,MATCH(FALSE,ISNUMBER(--MID(C113,ROW($1:$94),1)),0)-1)

          If you are using Excel 2019 and below, enter this formula as an array formula. In Excel 365, you can type as usual using the Enter key.

  18. Thanks for the site, I reference often.

    Here is my new hack for this: (OFFICE365 Only)

    =LET( A, MID($J2,ROW(INDIRECT("1:"&LEN($J2))),1),
    F, FILTER(A, ISNUMBER(A*1)),
    CONCAT(F)
    )

  19. Hello, plz
    Can anybody help me out.

    I have 26(4),5(7),9(10) in A1.

    I want to extract the numbers like this:

    26 in B1
    4 in C1
    5 in D1
    7 in E1
    9 in F1
    10 in G1

    Plz Help.

  20. Good day,

    what formula will work best, if you want to create a register list. That when you type an employee's pers number all the personal info pulls through eg. name, surname, job title and workplace. I have the master data sheet but want to make my life easier when reporting on other related reports.

  21. Hi, I used the formula to extract number from beginning of strings :

    =LEFT(A2,SUM(LEN(A2)-LEN(SUBSTITUTE(A2,{"0","1","2","3","4","5","6","7","8","9"},""))))

    to extract

    2A 1234521

    it was supposed to extract 2, but instead it extract

    2A 12345

    Why is that? Please help.

    1. Hi Shay,

      To extract a number only from the beginning, please use this formula:

      =LEFT(A2, MATCH(FALSE, ISNUMBER(MID(A2, ROW(INDIRECT( "1:"&LEN(A2)+1)), 1) *1), 0) -1)

  22. Hello
    I would like to extract only those number which has tin written in front. can someone help me with formula.

    Goodman Fielder tin500766109 FOODMEA072 Chicken Thighs Normal (CTN/7.5KG)
    Foods Pacific Ltd tin 500546606 FOODDAI074 Cheese Mozzarella Grated 5 Star Gold (CTN/ 2x5KG)
    Tappoo tin500618105 BEVCIDER004 Cider Pear Isaac's (CTN/ 12x330ml)
    Tappoo tin500618105 BEVCIDER005 Cider Apple Isaac's (CTN/ 12x330ml)
    Satish Kumar Marketing tin 113065604 FOODVEG074 VegAlfalfa Sprout Imported (Punnet)

  23. Hello Reader, just another comment . . .

    But need you + any assistants, to know VERY VERY sincere appreciation for such brilliant compilation of commitment to others having a success using sheets, over many years ! !

    I only started when PC’s were 16K / 64K we could do 255 x 255 single sheets . . . Oh, how it’s changed.

    THANKYOU & hopefully your future plans for site develop how you wish.

    Best Regards,
    Lee_ an Aussie

    ps. ;-)

  24. Hello,
    I would like to extract the phone numbers from this cell.

    7. UZOUKWU, PRINCE ROYCE 0803 743 5119-MUM/0803 275 9140-DAD

    I have a long spreadsheet of names & the positioning of the phone numbers are not in the same place.

    However I will separate these phone numbers in 2 cells.

    1. Hello!
      If the phone number always has the same number of digits, you can try these formulas:

      =MID(A1,SEARCH("-",A1,1)-13,13)

      =MID(A1,SEARCH("-",A1,SEARCH("-",A1,1)+1)-13,13)

      I hope I answered your question. If something is still unclear, please feel free to ask.

      1. The first one worked, for the first phone numbers and the 2nd pulled the 2nd phone number.
        Thank you so much.

  25. Hi alexander,
    How do i extract number from

    1 - 123, Singh Petrol Pump, Bishrampur, 497226, 36
    2 - Company, 123, 123, 788031, 123
    3 - 234, Danapur Maruti Suzuki Agency, Gopalganj, 841427, Bihar
    4 - Plot No RM-126,R & C Zone,, MIDC INDL. Area, Butibori. Dist Nagpur, 441122, 27- Maharashtra

    FOR 1ST ROW I WANT 497226
    FOR 2ND ROW I WANT 788031
    FOR 3RD ROW I WANT 841427
    FOR 4TH ROW I WANT 441122

    Please let me know the formula

    1. Hello!
      You are using commas as word separators. You can extract the penultimate word using the formula —

      =TRIM(MID(A1,FIND("*",SUBSTITUTE(A1,",","*",LEN(A1)-1 -LEN(SUBSTITUTE(A1,",",""))),1)+1, FIND("*",SUBSTITUTE(A1,",","*",LEN(A1)- LEN(SUBSTITUTE(A1,",",""))),1)- FIND("*",SUBSTITUTE(A1,",","*",LEN(A1)-1 -LEN(SUBSTITUTE(A1,",",""))),1)-1))

      Hope this is what you need.

      1. what if i want to get only 4 digit for example :
        aadfnmm kadflk ZZ56 ladkkfiiss
        alkliid kalkem 23 lsd 5675 llk,slkdk

        thanks you

      2. Thank you Alexander

  26. ILH-E-AC-030
    ILH-E-AC-031
    ILH-E-AC-032
    ILH-E-AC-033
    ILH-E-LO-003 SHT1
    ILH-E-LO-003 SHT2
    ILH-E-LO-027 SHT1
    ILH-E-LO-027 SHT2
    ILH-E-LO-027 SHT3

    i want to extract this to other cell so it look like:
    030
    031
    032
    033
    033
    033
    027
    027
    027

    can someone tell me the formula to extract just the 3 digits number after the last "-" from left?

  27. I am trying to pull just $ amount with Decimals and commas in this sentence how would I do that

    Paying total amount of $ 12,275.21

    Thanks in advance

  28. Thank you, it's works!

  29. Working Fine.
    =CONCAT(IF(ISNUMBER(--MID(A4,ROW($1:$93),1)),MID(A4,ROW($1:$93),1),""))

    Using the formula
    1orrange&2apple = 12 ( Answer getting now)

    I need the answer as
    1orrange&2apple = 3 ( it suppose to add up the numbers)

  30. This Formula is working out for me. But is there any solution that I can sumup the values.

    Example: 1apple&2orange = 12 (The answer what I am getting as of now but I need to sumup & get "3" as a answer)

    Please help me with this.

    =IF(SUM(LEN(A2)-LEN(SUBSTITUTE(A2, {"0","1","2","3","4","5","6","7","8","9"}, "")))>0, SUMPRODUCT(MID(0&A2, LARGE(INDEX(ISNUMBER(--MID(A2,ROW(INDIRECT("$1:$"&LEN(A2))),1))* ROW(INDIRECT("$1:$"&LEN(A2))),0), ROW(INDIRECT("$1:$"&LEN(A2))))+1,1) * 10^ROW(INDIRECT("$1:$"&LEN(A2)))/10),"")

    1. Hello!
      To extract all numbers from text please use the following formula

      =CONCAT(IF(ISNUMBER(--MID(A4,ROW($1:$93),1)),MID(A4,ROW($1:$93),1),""))

      1. Working Fine.
        =CONCAT(IF(ISNUMBER(--MID(A4,ROW($1:$93),1)),MID(A4,ROW($1:$93),1),""))

        Using the formula
        1orrange&2apple = 12 ( Answer getting now)

        I need the answer as
        1orrange&2apple = 3 ( it suppose to add up the numbers)

        1. Hello!
          Replace CONCAT function with SUM:

          =SUM((IF(ISNUMBER(--MID(A4,ROW($1:$93),1)),--MID(A4,ROW($1:$93),1),"")))

          Hope this is what you need.

  31. 500-555-0172
    325-555-0137
    582-555-0148
    1 (21) 500 555-0145
    1 (12) 500 555-0117
    615-555-0153
    926-555-0182
    1 (22) 500 555-0140
    1 (11) 500 555-0190
    961-555-0122
    740-555-0182
    775-555-0164

    Write a formula to extract the numbers, eliminating all the spaces symbols state codes

    1. Hello!
      Formula to extract the numbers, eliminating all the spaces symbols and codes —

      =CONCAT(IF(ISNUMBER(--MID(REPLACE(A2,1,IFERROR(FIND(")",A2,1),1),""), ROW($1:$93),1)), MID(REPLACE(A2,1,IFERROR(FIND(")",A2,1),1),""), ROW($1:$93),1),""))

      I hope my advice will help you solve your task.

  32. Please could you help me with a formula that can extract number from 9 year(s), 11 month(s),
    and add a decimal point after years.
    Q1- 9 year(s), 11 month(s),
    Answer from formula - 9.11

    1. Hello!
      The formula below will do the trick for you:

      =SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(Q1,ROW($1:$93),1)),MID(Q1,ROW($1:$93),1)," ")))," ",".")

      I hope it’ll be helpful.

  33. Dear Expert Users
    Please help anybody for get area from 250x350 that is written in one cell
    and area should be 87500.

    1. Hello!
      Unfortunately, you can only turn text into a formula in Excel using macros. This cannot be done using formulas.

  34. this is the number 15060277631602300000,
    i want to separate it like that 1506027763//1602300000
    whats the formula for this .please help

  35. Sorry but,
    35600aaa bbb/ccc/25*36/450 // Original text.
    35600 (O) // The answer I want.
    35600aaa bbb(X) // When applying the provided formula.
    Can you make an extended formula that meets my requirements?

  36. Sorry but,
    I want
    25600aaa BBB / 25 * 35 * 46cm
    ->
    25600

  37. I have read well on how to extract numbers from the beginning of a text string.
    However, even if there are additional numbers in the middle of the text string, I want to extract only the characters at the beginning in addition to the additional numbers. In other words, if you have a number in the middle of a text string (if the number ends and there is another number after the letter), you want the result to remain unchanged, but the formula provided does not. Is there a possible formula?

    1. Like below
      25600aaa bbb/25*35*46cm

  38. Do you have formula, including the decimal point.
    Sample: RT-12.5BT, RG5.7T
    Because when I use the formula result is
    Result: 125, 57

    1. Hello James!
      I’m sorry but your task is not entirely clear to me. Could you please describe it in more detail?
      Which formula are you using? Explain more precisely what result you want to get? Number with two decimal places?

  39. Hi alexander,
    How do i extract number from 113°53'42" to 1135342 ?
    Please let me know the formula
    Thanks before.

    1. Hello,
      Please try the following formula:

      =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,"”",""),"°",""),"’","")

      I hope this will help

  40. Thanks for the formula - it works, and it's going to save me a ton of time!

  41. Dear
    for example : 25,20,15,25,300,40 is it possible to extract the numbers before "g",
    Ali Baba Dark Chocolate 25 gm box 12 pcs
    Ali Baba Dark Chocolate 20gm*24 box
    Cadbury 5 Star White Chocolate 15gm
    Kinder 2 White Chocolate 25 gm*24
    ALpella Biscuits W/Marshmallow300gm
    Alpella Chocolate 40gm
    plz let me know the formula

    1. Hello!
      If I understand your task correctly, the following formula should work for you:

      =CONCAT(IF(ISNUMBER(--MID(MID(A15, FIND("g",A15,1)-5,5),ROW($1:$93),1)), MID(MID(A15,FIND("g",A15,1)-5,5),ROW($1:$93),1),""))

      I hope it’ll be helpful.

  42. hi there,
    how do i extract any number before a decimal point using a formula.
    meaning 5569.9008 i only want to extract 5569. the formula has to be across for any types of decimals and combination numbers. thank you for the assistance.

    1. Hello!
      For decimal use the INT function

      =INT(A1)

      What is the combination numbers? Google does not know. Neither do I.

  43. I am wondering if this formula can be applied for address street number extraction, wherein the address line you have multiple numbers. For example:

    "Rua Hungria, 1240 – Jd. Europa | 1º andar" = 1240 & 1 = 12401

    And so, I was hoping for a solution to insert "-" between every occurring number. Thoughts?
    This is really great post! Thanks.

    1. Hello Krystian!
      I’m sorry but your task is not entirely clear to me. For me to be able to help you better, please describe your task in more detail. Please specify what you were trying to find, what formula you used and what problem or error occurred. Give an example of the source data and the expected result.
      It’ll help me understand it better and find a solution for you. Thank you.

      1. Hey Alex!

        I am using this formula:
        =SUMPRODUCT(MID(0&I25, LARGE(INDEX(ISNUMBER(--MID(I25, ROW(INDIRECT("1:"&LEN(I25))), 1)) * ROW(INDIRECT("1:"&LEN(I25))), 0), ROW(INDIRECT("1:"&LEN(I25))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(I25)))/10)

        And here is the example of raw data:
        R LEOPOLDO COUTO DE MAGALHAES JUNIOR, 758 - ANDAR: 15; CONJ: 151;

        Using the formula on the above example, I am getting this: 75815151 - concatenated numeric value of all numbers from the string. And, what I am hoping is to add a special character that would show the numbers like so: 758-15-151
        In short, on top of extracting the numbers, differentiate multiple numbers by some special character, "-" for example.

        Let me know if this is better. Thanks!

        1. Hello Krystian!
          You can use a custom format using the TEXT function

          =TEXT(A1,"###-##-###")

          where A1 is the cell with your formula.
          Or use your formula in the TEXT function

          =TEXT(SUMPRODUCT(MID(0&I25, LARGE(INDEX(ISNUMBER(--MID(I25, ROW(INDIRECT("1:"&LEN(I25))), 1)) * ROW(INDIRECT("1:"&LEN(I25))), 0), ROW(INDIRECT("1:"&LEN(I25))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(I25)))/10),"###-##-###")

          I hope this will help, otherwise please do not hesitate to contact me anytime.

          1. Hi Alexander, in my case I'd need it more dynamic. Raw data consists of multiple words and there are 2 numbers included. These numbers to be separated by a delimiter.
            Is it possible to create this formula without a specific pattern. That it simply extracts the numbers out of a text. no matter how long the text is and how long the numbers are. delimited by a special char such as blank or "-"? Thanks in advance for your help

            Example:
            client has ordered 500 pieces and wants to have 500 eur in return.
            desired result in cell with formula: 500-500

            client has exerciesed 500 and wants 3564656,32 new
            desired result in cell with formula: 500-3564656,32

            1. Hi,
              If I get you right:
              To extract numbers "500-500" from text "client has ordered 500 pieces and wants to have 500 eur in return",
              use the formula

              =SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(A2,ROW($1:$94),1)), MID(A2,ROW($1:$94),1)," ")))," ","-")

              I hope this will help

              1. Dear Alexander,

                thanks for your hint. Issue is, that on my machine at work I am not allowed to install anything due administrator.

                So I hasd to replace the dots and commas by nothing. Then your formula worked well!!

                Thanks for your hint with your tool. Wil use it at home:-).

              2. Thank you in Sharing your "Learned Wisdom "

                We learn Every Moment even after the Physical Invisibility of ourselves.

                What is the Purpose of Learning if we choose not to share.

                Educate a Man" and Thou will Feed the Nations of the World.

                Blessings to You

              3. Dear Alexander, I just wanted to know how the formula could be adpated in order show the below. So if the first and or second number is with mentioning ofcomma/point.

                as with previous forumla it shows as below when comma/point are inside the numbers:
                500-008-356456-32

                raw data:
                client has exerciesed 500,008 and wants 3564656,32 new items

                desired result in cell with formula:
                500,008-3564656,32

                raw data:
                client has exercesed 500.008 and wants 3564656.32 new

                desired result in cell with formula:
                500.008-3564656.32

                thanks in advance for your help.

              4. Hello!
                You want to extract not only numbers, but also text. Comma and period are text. This cannot be done with a single formula. I was able to do this with Abledits Tools. First I used Convert Text (replace letters with spaces), then Trim Spaces (remove extra spaces) and again Convert Text (replace the space between numbers with a dash).
                You can install in a trial mode and check how it works for free
                If something is still unclear, please feel free to ask.
                You can ask a question on the blog or write to support@ablebits.com, include the link to your blog comment.

              5. Dear Alexander, thanks for your help on this. It works awesomly. Just had to perform SHIFT+STRG and ENTER in order to get the curly bracket around:-).Highly appreciated.

  44. very helpful but please make practice sample files available.

    1. Hi!
      You can find the practice sample workbook at the end of this tutorial under "Available downloads".

  45. I want o extract text from number like:
    1. 100Rte02T------RTet
    how can i do that by using formula

    1. Hello Learner!
      To extract all letters from text, use the formula

      =SUBSTITUTE((CONCAT(IF(NOT(ISNUMBER( --MID(A1,ROW($1:$93),1))), MID(A1,ROW($1:$93),1),"")))," ","")

      Hope this is what you need.

  46. This formula is working but the output is in form of exponential format. I am trying to remove GL code only, but it does not seem to be working.
    Here is the example:
    Resident Care:69000 · Wellness:69800 · Salaries and Wages:69890 · Payroll Taxes:69891 · FICA
    Resident Care:69000 · Wellness:69800 · Salaries and Wages:69890 · Payroll Taxes:69895 · FUTA
    Resident Care:69000 · Wellness:69800 · Salaries and Wages:69890 · Payroll Taxes:69897 · MI-UIA

    1. Hello!
      I’m sorry but your task is not entirely clear to me.
      For me to be able to help you better, please describe your task in more detail. Please let me know in more detail what you were trying to find, what formula you used and what problem or error occurred. It’ll help me understand it better and find a solution for you. Thank you.

  47. Hi Team,
    -6.135474.10.00.100012-AziziDevelopments-WO-1-73944857464-CONTR0067799835-Inet

    I want to extract only this portion "6.135474.10.00.100012" and some thing like that number from rest of data of 3000. Can anyone help me please with the formula.

    1. Hello Mayank!
      If I understand your task correctly, the following formula should work for you

      =LEFT(A1,SEARCH("-",A9,2)-1)

      I hope this will help, otherwise please do not hesitate to contact me anytime.

      1. Many Many Thanks Alexander. Will try to implement with this new formula.

  48. hi,
    Eg: One column 20Pcs Disposable Filter 3 Ply mask and another column 20
    how to find the same number exist in that string is correct?
    I have tried SEARCH option but is show only position. i want the exact number found in both the column is right/wrong?

    1. Hello!
      It is not clear what result you want to get. But maybe this formula is right for you.

      =IF(SEARCH(B1,A1,1)>0,"Right","Wrong")

      Hope this is what you need.

      1. thank you so much..

  49. THANK YOU SO MUCH THIS SAVED MY LIFE

  50. -6.135474.10.00.100012-AziziDevelopments-WO-1-73944857464-CONTR0067799835-Inet
    I want to extract only this portion "6.135474.10.00.100012" and some thing like that number from rest of data of 3000. Can anyone help me please with the formula.

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)