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 2. Total comments: 575

  1. How would I extract the "Product Unit Price" and "Product Total Price" from the following string?:

    Product ID: 4584, Product Qty: 1, Product SKU: BAU1234567-7, Product Name: Test Game Product Used Test, Product Weight: 48.0000, Product Variation Details: , Product Unit Price: 300.00, Product Total Price: 300.00

      1. Thank you! Now what if there were multiple products in the same string, so the "product unit price" appeared multiple times in the same string?

  2. My sample data is containing decimal numbers in the end
    eg. BSDFDF SDDF2356.70
    In this case the formula is ignoring after the decimal place and the output is
    70 instead of 2356.70

    1. Hi! To extract from text a decimal number that contains ".", try this formula:

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

      Hope this is what you need.

  3. How can i extract the two numbers in this string (text) in R3 cell:
    5 - 1000

    ?

    I tried =RIGHT(R3, LEN(R3) - MAX(IF(ISNUMBER(MID(R3, ROW(INDIRECT("1:"&LEN(R3))), 1) *1)=FALSE, ROW(INDIRECT("1:"&LEN(R3))), 0)))
    But it return:
    5 - 1000

    Doubt =LEFT will work...

    1. Hi! I don't really understand how you want to extract and write 2 numbers into one cell. Here is the formula to extract the numbers as an array. For more information, please visit: TEXTSPLIT function in Excel: split text strings by delimiter.

      =TEXTSPLIT(SUBSTITUTE(TRIM(CONCAT(IF(ISNUMBER(--MID(A1,ROW($1:$95),1)),MID(A1,ROW($1:$95),1)," ")))," ","."),".")

      You can extract numbers from text using regular expressions. Here is a detailed instruction with examples: Regex to extract strings in Excel (one or all matches).

      =RegExpExtract(A1, "\d+")

      I recommend paying attention to the Regex tool. You can find, extract, compare, delete, or replace strings that match the regular expression pattern you enter. You don't need to install any VBA code.

      1. Sorry might have not been clear.
        I have a cell Q3 with 5 - 1000, i want to get the 5 in numerical value (not string) in cell Q4, and I want to get numerical value of 1000 in cell Q5. Hope it is more clear that way

        Still i didn't try your answer yet, will check into it

  4. Hello
    I have a list of a lot of products 120-302-00, 126-302-05, 25-301-02, 1002-301-08,...
    I need to extract only the number in the middle (here 302 and 301).
    Can you help
    Thanks in advance

  5. How can I extract a number from inside parenthesis? I tried your formula above to extract a number from a value but there are some datasets that have a number in the name which is extracted as well and then combined with the number inside the parenthesis. I also have some data that the parenthesis in the name but those are text values. The common delimiting factor on my data is always (number).

    Example data: Joseph (Joe) Smith (4242)
    Desired output: 4242

    Thanks in advance for any help!

    1. Hi! Try the formulas from that paragraph in the article above: How to get number from any position in a string. You will get the desired result.

      1. Sorry it will work on this one and I tried to correct my post but had to post a 2nd one and that other post is gone now where I corrected the example data. Here is the example data I'm running into and can't figure out.

        Example data: Joseph926 (Joe) Smith (4242)
        Desired Output: 4242

        This is the one I'm running into that will just return 9264242

        Any ideas if it possible to only get a numerical value in parenthesis and ignore letters in parenthesis?

        Thank you!

        1. Hi! To extract part of a text string using a pattern, use regular expressions and the custom RegExpExtract function. You can find the examples and detailed instructions here: Regex to extract strings in Excel (one or all matches).

          =-RegExpExtract(A1, "\(\d{1,10}\)")

          I recommend paying attention to the Regex tool. You can find, extract, compare, delete, or replace strings that match the regular expression pattern you enter. You don't need to install any VBA code. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  6. How to give a separator in the "How to get number from any position in a string" with advanced formula

      1. Eg:- I'm a 34 years old person whot got 20 years of experience in 1 stream line.

        If we extract number from this string via formula. O/P will be like 34201. Instead of the 34201, how we format the result as 34_20_1

        1. Hi! To extract numbers from a text string with a separator between groups of numbers, try this formula:

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

          1. This works

            1. Hi Alexander how can we Sum the numbers?

              1. my Text is something like BL 5 / BR 5
                I want to extract Numbers then Sum up so the value will be 10

                but in case the text will be like BL 5 / BR 5 / TL (number here)
                output should be 11 no number indicated after the / it will treat it as 1

                let me know if not clear

              2. Hi! Split the text into separate cells using the "/" delimiter. You can find detailed guidelines here: Split string by delimiter or pattern, separate text and numbers. Or use TEXTSPLIT function.
                Then extract the numbers from each cell as described in the paragraph above: How to extract number from the end of text string.
                If nothing is extracted, use the IF function to replace the result 0 with 1.
                Sum the numbers.
                I hope it’ll be helpful. If something is still unclear, please feel free to ask.

  7. Hello, I want to extract 629 500.3- value as negative form in pharanthesis.

  8. Hello,

    First off thank you, this has saved me a lot effort.

    I am currently using the formula below:

    =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)

    But I am struggling as I require all numbers to make the correct number, i.e. when the value is x0300, I require 0300 to be the value, but instead I get 300.

    If it helps, I am on Excel 2016 so don't have TEXTJOIN or CONCAT working. Any chance there might be an answer?

    1. Sorry I should have added, this is a large data set with various issues on formatting, so I can't use LEFT or RIGHT properly.

      Some examples

      x0300
      230rn9
      98.4
      784
      0342erb3

      1. Hi!
        I'm looking for a formula than can extract a number from a cell that contains two or more numbers.
        For example:
        "I bought 4 bags@£2"
        So from the characters above that are in one cell, I want to to extract and get either 2 or 4.

      2. Hi! If you want to extract all the numbers from the text and write them as text, try this formula:

        =CONCAT(IF(ISNUMBER(--MID(A2,ROW($1:$20),1)),MID(A2,ROW($1:$20),1),""))

  9. Could you help with a formula that would extract the minutes and seconds from a column of cells that contains this type of string;
    1 minute and 14 seconds
    4 minutes and 18 seconds
    48 seconds
    1 minute

    Thank you!

    1. Hi! Your data doesn't have a common pattern. They are all different. So extract and use each number separately as described in the article above: Extract number from the right and from the left of a text string.

  10. Hi Sir. Would like to extract the numbers and values on below sample data. And would like to split them via 'space' delimiter.

    Wanderland KC - Evening 15.25 $65.62 $1,000.71

    1. Sir, data per cell is not the same so no common count on characters that can be used as starting point.

      Wanderland KC - Evening 15.25 $65.62 $1,000.71
      Wanderland KC - Night 28.50 $63.21 $1,541.21
      Wanderland KC - Weekend Evening 168.75 $70.77 $1,000.40
      Wanderland KC - WKD Evening OT 56.25 $106.16 $14,005.50
      Wanderland KC - Weekend Night 13.50 $63.86 $699.71
      Wanderland KC - WKD Night OT 15.00 $95.79 $1,425.64

      These are just sample data.

  11. Excuse me sir, i need help to solve a formula for data below:

    Klapsi SuNSoa HrsaSo 023 Haiasoe saoAisS
    AkSuej Nseop 0532 JslaSk JsieA asjejr

    I need to get the first 4 word from right (Everything include number, and character), the problem is its a little random, so the word doesn't contain the exact number of character. 1 Word can be containing 1-20 character, can you please help me solve the formula for this problem sir?

  12. Excuse me sir, the formula u gave us really helpfull for me... but i have a problem, i need to extract every number from my data, from example (OPsI 002/030 IklAs) the formula u told us is working, but the only problem is the formula didn't extract the first two zero number, so the result it gave me is (2030), but the one i need is (002030), how can i the result i need?

    1. Hi! I don't know what formula you used. But I assume that this formula extracts the digits from the text and returns a number. Therefore, the leading zeros are missing. To extract all numbers from text as text string, try this formula:

      =CONCAT(IF(ISNUMBER(--MID(A2,ROW($1:$95),1)), MID(A2,ROW($1:$95),1),""))

  13. How to extract the PIN CODE in the following string "DINESH AND SONS  GST 09ATFPM1158H1ZM-G T Road Jangiganj Bhadohi-15 KM FROM BHADOHI--BHADOHI-Uttar Pradesh-221310"

  14. Hi. I want to sort whole sheet based on uni ranking in australia.

    "World: 1
    Australia: 1"

    The problem is when it has few numbers such as

    "World: 10,
    Australia:100"

    "World: 15,
    Australia:150"

    How can i write the formula? Thanks!

  15. Good day :) How to give the results as below:
    Data --> Results
    3bf729 --> 3bf729
    1003121801(3BF729) --> 3bf729
    1003117898 3bf729 --> 3bf729
    1003110336 3bf729 --> 3bf729
    1003103192(3bf729) --> 3bf729
    boards 3bf729 --> 3bf729
    1003101812 3bf s/o --> 3bf
    1003097936(3bf729) --> 3bf729

  16. Doesn't work if there is a decimal point, e.g. 100.15 will only extract 15.

  17. Dear Sir,
    I need extract JA300732298 on below mention data.

    {"referrer":"https:\/\/www.joyalukkas.in\/checkout","address":"Joyalukkas India Limited","merchant_order_id":"JA300732298","item_information":"{\"EPS1128562\":\"JUL\"}"}

      1. Dear Sir,
        I need extract following data to different excel columns EGPS0985876,JUL,EGPS0985893,JUL ,EGPS0985902,JUL on below mention data.

        {"referrer":"https:\/\/www.joyalukkas.in\/checkout","address":"Joyalukkas India Limited","merchant_order_id":"JA300732640","item_information":"{\"EGPS0985876\":\"JUL\",\"EGPS0985893\":\"JUL\",\"EGPS0985902\":\"JUL\"}"}

          1. Dear sir,
            Below mention the data to extract following data LFT23207NST5JWP3

            Auth-26/07/2023 TRANSFER LFT23207NST5JWP3 SHAHBAZ NAZIRA

            1. Dear sir,

              following formula not suitable because data is different every column (=CHOOSECOLS(TEXTSPLIT(A1," "),3)

              extract following data LFT23207NST5JWP3

              1,Auth-26/07/2023 TRANSFER LFT23207NST5JWP3 SHAHBAZ NAZIRA
              2,Auth-TRANSFER LFT23207Y21TVRHB FAHAD MOOSA
              so every data is different.

              1. Dear sir,
                below mention the formula have an issue because find below,
                1,Auth-26/07/2023 TRANSFER LFT23207NST5JWP3 SHAHBAZ NAZIRA
                2,Auth-TRANSFER LFT23207Y21TVRHB FAHAD MOOSA
                so every data is different.

  18. Hi,

    How can I extract the string after the first underscore?

    Eg:
    P2_G1038_E_29.docx
    It will extract G

    P2_R7078_H_03_xxxx_xxx_xxxxxxxxx_control_after_printing.pptx
    It will extract R

    P2_TW3429D_H_Z8F78061234.pptx
    It will extract TW only and ignore D

    Thanks & regards,
    Nurul

  19. I have problem as below:
    Paid From aflb faof (259***5456)|USD 8.99|01 Jun 2023 09:22 AM|Invoice ID 401361407|Ref.BLSUB31520215260|ATEC Biodigesters International
    I just want only this number 401361407 (sometime this number have 9 or 8 character .
    could you help to provide formula.

      1. it's doesn't work, I think because of my excel.
        could you provide other formula.

        1. Hello! I assume that your Excel does not have these new functions. In that case, you can use the user-defined RegExpExtract function to extract numbers from text by pattern. You can find the examples and detailed instructions here: Regex to extract strings in Excel (one or all matches).
          For example:

          =MID(RegExpExtract(A1,"ID ([0-9]{5,10})"),4,20)

          I recommend paying attention to the Regex tool. You can find, extract, compare, delete, or replace strings that match the regular expression pattern you enter. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  20. hello i would like guidance on how to extract certain data from collumns
    there are just number & mixed with multiple lines

    Example :
    Cells Value
    [ B2 ] 100
    [ B3 ] Phone:3050
    Cards:91
    Banks1:33.52
    [ B4 ] 500
    [ B5 ] 600

    I would like to get the number extracted on the next row so it only show number :
    Cells Value
    [ B2 ] 100
    [ B3 ] 3050
    [ B4 ] 500
    [ B5 ] 600

    1. Hello! To extract the first number from the text, you can use the user-defined function RegExpExtract. You can find the examples and detailed instructions here: How to extract substrings in Excel using regular expressions (Regex).
      For example:

      =RegExpExtract(A1, "\d+", 1)

      I recommend paying attention to the Regex tool. You can find, extract, compare, delete, or replace strings that match the regular expression pattern you enter. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  21. Hi,

    How can I extract the number that does not contain any text?

    Eg:
    P2_G1038_E_29.docx
    It will extract 29

    P2_G2151_H_05.docx
    It will extract 05

    P2_R7078_H_03_xxxx_xxx_xxxxxxxxx_control_after_printing.pptx
    It will extract 03

    P2_TW3429_H_Z8F78061234.pptx
    It will extract nothing

    Thanks & regards,
    Nurul

    1. Hello! Use regular expressions and the custom function RegExpExtract to search for pattern characters in your text. For detailed instructions and examples, see here: Regex to extract strings in Excel (one or all matches).

      =MID(RegExpExtract(A1, "_([0-9]{1,3})"),2,10)

      To avoid installing VBA code in your workbook, you can use the Regex Tools. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  22. Hi i need to extract 4700090584/4700083771 number from below text

    BH-24&4700090584ARC FOR MONSOON PREPARATION & OTHE
    4700083771/JAMADOBA COLLIERY/RC96

    What will be the formula?

    Thanks & Regards

  23. Dear Sir,

    From this text UTR,BKIDY23129107772,BANK OF INDIA, I want "BKIDY23129107772" this Alphanumerical separate in next column.

    Thanks & Regards
    Pawan

  24. Thank you very much for the formulas, i need to extract exact numbers from string and the text contains as well other numbers. Can you please show me how to solve this?

    for example: Lnd/lnd rigts/bldgs, on 3rd-prty lnd
    12345678

    I need to get exact number "12345678"

    After applying formula: SUMPRODUCT(MID(0&C7, LARGE(INDEX(ISNUMBER(--MID(C7, ROW(INDIRECT("1:"&LEN(C7))), 1)) * ROW(INDIRECT("1:"&LEN(C7))), 0), ROW(INDIRECT("1:"&LEN(C7))))+1, 1) * 10^ROW(INDIRECT("1:"&LEN(C7)))/10)

    The result is: 312345678

    Thanks so much in advance!

    1. Hi! You can extract numbers from a pattern using the custom REGEX function. For example,

      =RegExpExtract(A1, "\d{8}", 1)

      You can find the examples and detailed instructions here: How to extract substrings in Excel using regular expressions (Regex). I recommend paying attention to the Regex tool. You can find, extract, compare, delete, or replace strings that match the regular expression pattern you enter. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  25. Thank you SO MUCH for the formula for extracting numbers from a string. It works perfectly :)

  26. Thank you SO MUCH for the formula for extracting numbers from a string. It works perfectly :)

  27. Hi there! I want to extract a UPC 12 digit number from below description in excel colomn. How i do this? Your cooperation in this regard is highly appreciable. Thanks!

    "HBG86-4 Hot Wheels Make A Mactch Card Game (4 per case) UPC 887061988741 Asin B08V54CNWTt's the classic card matching that kids love made into a game with graphics themed to another childhood playtime staple – Hot Wheels cars!This game is designed"

    1. Hi!
      You can extract the numeric code from the text with the custom function RegExpExtract. You can see detailed instructions and an example file in this article: How to extract substrings in Excel using regular expressions (Regex).

      =MID(RegExpExtract(A1,"UPC ([0-9]{12})"),5,12)

      You can also use Regex tools without formulas. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

      1. Thanks! Formula working. But i face a problem because sometimes UPC have 13 digits and and when i put formula =MID(RegExpExtract(A1,"UPC ([0-9]{12})"),5,12) only 12 digits of UPC are shown. How to solve this problem so that 12 digit UPC and 13 digit UPC are shown exactly as original. Thanks Again for your cooperation.

        1. Hi!
          The formula I sent to you was created based on the description you provided in your first request. However, as far as I can see from your second comment, your task is now different from the original one. Add a choice of 12 or 13 digits to the formula. I recommend reading this guide: Excel Regex cheat sheet.

          =MID(RegExpExtract(A1,"UPC ([0-9]{12,13})"),5,20)

  28. Hi Alexander,

    I need your support on how to extract the pack-size from the text string.

    Example: XXLR SHAMP ANT-HR FALL (NPS)GF 24X200ML

    I just need 200 ML as a result. The position of the pack-size within the text string differs for every description thus can't use the formula =Left (A2, 5) .

    I would appreciate your help in this regard.

    Thanks!

    1. Hi!
      In your example you can use the RIGHT function. If your data has some common pattern, you can use the custom function RegExpExtract to extract the pack-size. See this manual for detailed instructions and examples: How to extract substrings in Excel using regular expressions (Regex).
      I recommend paying attention to Regex Tools. You can use it to find, extract, delete, or replace strings that match the pattern you entered.
      It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.
      If you give more examples of the source data and the desired result, I will try to help.

  29. Hi, can you help me to extract specific number from string of numbers in a row, eg
    0 0 1 0 3 0 4 0 0 6 7 9 0 0 0 - how to extract number 4 from this string of numbers....Tq

      1. Thanq Very Much.

  30. Hi, Could i extract the number of Net Outage days, hours and mins from the following text, and add them to seperate columns
    "Clock Stops - 0days 4hours 15mins Net Outage - 0days 0hours 53mins Escalated"

      1. Thank you. Ill give it a go

  31. How would I extract only the largest number from a string including double digit numbers.

    Ex (adcd)4(abcd)12(abcd)20(abcd)15

    And I need just the 20 extracted

    1. Hello!
      You can extract substrings matching a given pattern using regular expressions. Use custom function RegExpExtract, as described in this guide: How to extract substrings in Excel using regular expressions (Regex).
      You can extract the maximum number from the text using the following formula:

      =MAX(--RegExpExtract(A1,"\d+"))

      With Regex Tools, you can find, extract, remove, or replace strings that match a regex pattern you enter.
      It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

  32. How would I get it to take all of the numbers, even if it starts with zeros? For example, I need it to pull 002, but when I use the formula above, it only pulls "2". How can I make sure that the two zeros are included? Thank you!

  33. 212LBTCE94995226 I WANT TO EXTRACT NUMBER FROM THIS TEXT

  34. Hello, how would I go about extracting only the 197, 57, and 166 (the dimensions) from the following cell? Ideally each extracted number should be in a separate column.

    Package 1 — L: 197cm, W: 57cm, H: 166cm, Weight: 75kg, qty: 1

    1. Hello! To extract multiple numbers from a text string, use regular expressions and the custom function RegExpExtract. You can find the examples and detailed instructions here: How to extract substrings in Excel using regular expressions (Regex).
      To extract not all numbers from the text, extract the desired part of the text string using this instruction: How to extract text between two characters in Excel.
      Try this formula:

      =TRANSPOSE(RegExpExtract(MID(A1, SEARCH("—", A1) + 1, SEARCH("Weight", A1) - SEARCH("—", A1) - 1),"\d+"))

      With Regex Tools, that are part of Ultimate Suite for Excel, you can find, extract, remove, or replace strings that match a regex pattern you enter. It is available as a part of our Ultimate Suite for Excel that you can install in a trial mode and check how it works for free.

      1. Thanks for the answer. I forgot to mention that I am doing the analysis on Google Sheets (so no support for Regex). Would you have any other ideas?

    2. PS: the formula should be copied down do other cells which have different numbers

  35. Hi
    How can i extract the first number (with 4 or 5 digits) from rows like these two:
    69002-ODN3-S-RFI-0197
    7082-E-RFI-0038
    I can also experience a randow row looking like this where i still want the first 4 digit number:
    #7082-E-RFI-0071

    and at the same time get no value when the rows look like these for example:
    XXX-ODN3-960
    ODN3-BIM-RFI-0014
    E&I-SWBD-RFI-057

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

      =CONCAT(IFERROR(MID(REPLACE(A1,IFERROR(FIND("-",A1,1),1),100,""),ROW(1:10),1)*1,""))

  36. This does not work at all. I tried with their exact example 05-EC-01 and formula and it returned #N/A. So frustrated I have been wasting my with this

  37. Thank you for the information it has been very helpful to pull the numbers I need out of a text. Now i want to just delete the numbers I pulled so i can use the data for lookup.

    =LOOKUP(9.9E+307,--RIGHT(MID(A20,MIN(FIND({1,2,3,4,5,6,7,8,9,0}, $A20&"1023456789")),999),ROW(INDIRECT("1:999"))))

    This worked to get what I needed.

    1ST SHIFT OUTBOUND NON CON LIFT OPERATOR PTO 8.00
    1ST SHIFT OUTBOUND NON CON LIFT OPERATOR HOLIDAY 8.00
    1ST SHIFT OUTBOUND NON CON LIFT OPERATOR REGULAR 55.75
    1ST SHIFT OPERATIONS INVENTORY CONTROL CYCLE COUNTER OVERTIME 0.50
    1ST SHIFT OPERATIONS INVENTORY CONTROL CYCLE COUNTER REGULAR 40.00
    1ST SHIFT MAINTENANCE MAINTENANCE 2 SANITATION WORKER OVERTIME 0.50
    1ST SHIFT MAINTENANCE MAINTENANCE 2 SANITATION WORKER REGULAR 40.00
    1ST SHIFT MAINTENANCE MAINTENANCE 1 MAINTENANCE MECHANIC REGULAR 64.00

    Now I want to delete the numbers at the end.

    1. Hi!
      Unfortunately, your formula does not work for me. To remove numbers from text try this formula -

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

      1. That works to remove all the numbers but I only wanted to remove the numbers on the right.

        1. Hi!
          To remove the last word from a text string, use this formula:

          =TRIM(REPLACE(SUBSTITUTE(A1," ",REPT(" ",20)), LEN(SUBSTITUTE(A1," ", REPT(" ",20)))-19,20,""))

          1. Thank you that worked perfect. I really do appreciate your help.

  38. Hi,

    How to extract mobile number alone from the below text string

    "ABC Imaging & Diagnostics,
    80-5/4-3, TH Road,
    Chennai-520000,
    TamilNadu, India
    E-mail: abcimaging @ yahoo.co.in
    Contact Person: ABC
    Mobile: 9009949999"

      1. I've been racking my brain on how to find numbers before Certain text and this helped a lot thank you very much!!

        =MID(C3,SEARCH("GA",C3)-3,2)

        Was the Formula I used.

  39. How to put comma (,) before any number in the address formal? Numbers are not fix in the address it might be on any position.

  40. how to extract number from this string "1 PKt- Tomato 1057 - 20 K Seeds - 10850 Rs / on invoice 11000
    7 Pkt- Chilli Teja - 4 Seeds - 385 Rs / on invoice 400"

    result should be
    1 11000 10850 150 150
    7 400 385 15 105

  41. Hello, how can I pull this date from string 2/23/2078 ADM to 2/23/2078.

    PS this is bikaram shambat
    Waiting for response.

  42. Thanks it really worked.

  43. How would I extract only the largest number from a text string? Eg. if I had a string such as asd7adh8ash6 and I need just the 8 extracted.

    1. Hello!
      Extract the numbers from the text as described in the article above and use the MAX function to choose the maximum.

      =MAX(IF(ISNUMBER(--MID(A1,ROW($1:$94),1)), --MID(A1,ROW($1:$94),1)," "))

      1. This doesn’t seem to work as I keep getting a #VALUE! error.

        1. I now have gotten it to work. However, I sometimes have double digit numbers that I need to extract. Ex adhh6asbf17asd5
          So, I need 17 rather than 7. Thanks for your help!

          1. Hi!
            I'm sorry you're not asking the right question.
            To extract the maximum two-digit number from text, try the formula:

            =MAX(IF(ISNUMBER(--MID(A1,ROW($1:$100),2)),--MID(A1,ROW($1:$100),2),""))

  44. Hello,

    How can I get the string of numbers from this text to populate with the formula but also include the dash

    Ex. 51-1780 Expenses Parent : Travel Expense

    I used the following formula and it worked but I need the dash

    1. Hello!
      To extract numbers from the text along with dash, try the formula

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

      1. Thanks, Alexander,

        Excel shows me "You've entered too few arguments for this function"

        1. Hi!
          The formula works. What version of Excel are you using and what are the separators in the formula?

          1. Thanks for the swift answer, Alex,

            I found out the issue, it works now, but it takes all the numbers in a string and merges them into one. How can I take only the last 14 symbols (with dashes) from the right side of the cell?

            Thank you,
            Eldar

      2. Sorry replied to the wrong question

  45. Hi, the formula =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),"") does not work on numbers with decimals.

    1. Hi!
      This formula cannot extract the decimal number because the decimal separator is not a digit.
      To extract a delimited number from text, try this formula:

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

  46. Billed days vs Amount of a person I have put in a concatenated formula:
    {=CONCATENATE(COUNTIF(E4:AI4,8)+(COUNTIF(E4:AI4,4)/2),"/",(IFERROR(VLOOKUP(C4,'Master'!$C$4:$P$35,14,FALSE)*(COUNTIF(E4:AI4,8)+(COUNTIF(E4:AI4,4)/2)),"")))}

    Value comes to be 21/3525
    Using your formula {=VALUE(RIGHT(D4,LEN(D4)-3))} I get the value to be 3525 !!! PERFECT

    But if there is half day of resource the above value becomes 20.5/3125, using the same {=VALUE(RIGHT(D4,LEN(D4)-3))} formula, I get a number 9852358 or so... This disturbs the entire calculation for the month!

    What formula can I use to get the right cost if a person takes half day off (so 4 hours instead of 8) so the monthly cost comes right?

      1. @Alexander Trifuntov - The solution worked !!!
        THANK YOU

  47. Hiya,

    Do you know how I can extract the first number in a string? Example below

    Cell value = dasd adas adsad 001234 dasd adas adsa 06253
    Expected result = 001234

    Thanks,

    Kim

  48. Hi, I used your formula for my data, and it works!
    But the problem is the number extracted is only the number, how if I need to extract number with point?

    For example:
    "afhb jafbjdk 2.60sad aksd" to be "2.60"

    Thank you

    1. Hello!
      To extract all numbers and dots from text try this formula -

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

      I hope it’ll be helpful.

  49. i have lot of different word, like these 08048K0922, 45002CVC922, 9.5050K0722, 10.505CVC0722 i want to separate text specific value from that words like 08K,45CVC or 45CV, 9.5K, 10.5CV or CVC. how can i doing this?

  50. how to separate only numbers from mixed letters from a cell in excel.
    NEFT/TB/AXTB222710184240/AMARF

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 :)