You can find any number inside a text string in Excel by combining a few built-in functions: use FIND or SEARCH to locate the first digit, then MID and VALUE to extract and convert it. For a quick check of whether a cell contains any digit at all, use SUMPRODUCT with ISNUMBER and MID. There is no single “find number” button, but these formulas cover almost every case, from pulling a price out of “$1,299.99” to flagging rows that contain a phone number.

What You'll Need

  • Excel 2013 or later (desktop) or Excel for Microsoft 365. Most formulas here also work in Excel for the web and Excel for Mac, but menu labels can differ slightly by version and region.
  • A worksheet with your text strings in a column, and an empty column beside it for the result.
  • Basic familiarity with entering formulas and dragging the fill handle.

Step-by-Step

  1. Set up your data. Put the text strings in column A, starting at A2. Leave column B empty for the extracted number.
  2. Decide what “find a number” means for you. Do you want to know whether a cell contains a digit, or do you want to pull out the number itself? The formulas differ. The next steps cover both.
  3. Check whether a cell contains any digit. In B2, enter:
    =SUMPRODUCT(--ISNUMBER(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)*1))>0
    This returns TRUE if at least one character in A2 is a digit, FALSE otherwise. Copy it down column B. The INDIRECT part builds an array of character positions; MID pulls each character; multiplying by 1 turns digits into numbers; ISNUMBER flags them; SUMPRODUCT adds them up.
  4. Extract the first number from a string. If you need the actual number, use a helper column to find where the first digit starts. In C2, enter:
    =MIN(IFERROR(FIND({0,1,2,3,4,5,6,7,8,9},A2),""))
    In Excel 365 this spills automatically; in older versions press Ctrl+Shift+Enter to make it an array formula. This gives the position of the first digit.
  5. Pull the number out. In D2, enter:
    =MID(A2,C2,SUMPRODUCT(--ISNUMBER(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)*1)) )
    This extracts the digits starting at the first digit position, using the count of digits as the length. If your numbers include a decimal point or comma, extend the formula to include those characters, or use a more robust approach described in the Tips section.
  6. Convert text to a real number. Wrap the result in VALUE if you need to do math: =VALUE(D2). Without this, “123” is text and will not sum.
  7. Copy down. Drag the fill handle from B2, C2, and D2 down to the last row of your data. Check a few results against the original strings to confirm they match.
  8. Handle errors. If a cell has no digits, the formulas return errors. Wrap them in IFERROR(...,"") to show a blank instead. For example: =IFERROR(VALUE(D2),"").

Common Mistakes

  • Forgetting array entry in older Excel. Formulas using ROW(INDIRECT(...)) or FIND({0,1,...}) need Ctrl+Shift+Enter in Excel 2019 and earlier. If you just press Enter, you get a wrong or single result.
  • Treating the result as a number when it is text. MID always returns text. Sums and comparisons fail until you wrap it in VALUE or multiply by 1.
  • Ignoring decimals and negative signs. The basic formula grabs digits only. “-12.5” becomes “125”. Decide whether you need the sign and decimal point, and adjust the character set accordingly.
  • Assuming FIND and SEARCH are the same. FIND is case-sensitive and does not accept wildcards; SEARCH is case-insensitive and does. For digit searches either works, but mixing them up causes confusion elsewhere.
  • Hard-coding the range length. Using a fixed number instead of LEN(A2) breaks when strings vary in length.

Tips

  • For a cleaner extraction that handles decimals, minus signs, and commas, consider TEXTBEFORE and TEXTAFTER (Excel 365 and Excel 2021+) or Power Query, which has a “Extract” option under Transform that can pull numbers directly.
  • Use SEARCH instead of FIND when you want case-insensitive matching or wildcards.
  • If you only need to flag rows, conditional formatting with a formula like =SUMPRODUCT(--ISNUMBER(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)*1))>0 highlights cells containing digits without adding a helper column.
  • Test on a copy of your data first. Array formulas can be slow on very large ranges; limit the range to the rows you actually use.
  • Name your helper columns clearly (e.g., “FirstDigitPos”, “ExtractedNumber”) so the sheet stays readable.

Troubleshooting

  • Formula returns #VALUE!: Usually caused by a cell with no digits, or by entering an array formula without Ctrl+Shift+Enter. Wrap in IFERROR and confirm array entry.
  • Result is blank when you expect a number: Check that the cell actually contains a digit, not just a symbol like “#” or a non-breaking space. Use LEN and CODE to inspect characters.
  • Extracted number is wrong length: The count of digits may include digits from a second number in the same string. If your strings contain multiple numbers, decide which one you want and adjust the start position accordingly.
  • Formula works on one row but not others: Relative references may be off. Confirm the row number in A2 matches the row you are filling.
  • Excel is slow: Array formulas over thousands of rows can lag. Convert the range to a Table and use structured references, or move the logic to Power Query.

Frequently Asked Questions

Can Excel find a number in a text string without a formula?

Not directly. You can use Find and Replace (Ctrl+F) to locate a specific number, but to extract or test for any number you need a formula or Power Query.

Does this work in Excel for the web?

Most formulas work, but array entry behavior differs. In Excel for the web, dynamic arrays spill automatically, so you may not need Ctrl+Shift+Enter.

How do I extract all numbers from a string, not just the first?

Use TEXTSPLIT with a delimiter list of digits, or Power Query’s “Extract” transform. For multiple separate numbers, you may need a more complex formula or a small VBA function.

Why does my formula return text instead of a number?

MID returns text. Wrap the result in VALUE or multiply by 1 to convert it.

Can I use wildcards to find numbers?

SEARCH supports wildcards like ? and *, but they match any character, not specifically digits. Use the digit-array approach for numbers.

What if my string contains a decimal or negative sign?

The basic formula ignores them. Extend the character set in the FIND array to include . and -, or use Power Query for cleaner handling.