Function Problems

Find a Number Inside Text in Excel Without VLOOKUP

Steven ParkerSteven Parker Nov 18, 2026 870 views

Question details

Find a number embedded in a longer text cell without using VLOOKUP.

Find a Number Inside Text in Excel Without VLOOKUP
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user has a number to search for and a column of sentences that may contain it.
Observed behavior
The user wants the position of the first sentence containing the number or the matching sentence itself.
Before you start

Place the number to find in A2 on the sheet where you will enter the formula, and check that the sentences are in column A of Sheet1. Keep A2 nonblank and preserve any leading zeros as text.

Solution 1Recommended

Find the First Matching Sentence with MATCH

Use wildcard matching to return the position of the first sentence containing the number.

1
Enter the search number

On the sheet containing the formula, enter the number or text identifier in cell A2.

2
Enter the MATCH formula

Select an empty cell and enter =IFERROR(MATCH("*"&A2&"*",Sheet1!A:A,0),"Not found").

3
Check the result

Press Enter. The formula returns the position of the first matching cell in Sheet1 column A, or Not found if there is no match.

Find the First Matching Sentence with MATCH
Partial numbers also match: The formula searches for a sequence of characters, so 123 also matches a sentence containing 1234. Because the range starts at row 1, the returned position is also the worksheet row number.
Find text with WPS Spreadsheets

Find a Number Inside a Sentence in WPS Spreadsheets

Use MATCH with wildcards in WPS Spreadsheets to find the first sentence containing a number and return its position.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Check the search data: Enter the number in A2 on the current sheet and confirm that the sentences are in column A of Sheet1.
  3. 3. Enter the formula: Select an empty cell and enter =IFERROR(MATCH("*"&A2&"*",Sheet1!A:A,0),"Not found").
  4. 4. View the result: Press Enter to display the first matching position or Not found.
Find a number embedded in a longer text cellUse familiar MATCH and IFERROR formulasOpen and save Microsoft Excel XLSX filesWork with spreadsheets using a familiar interface
QA img-9

Frequently Asked Questions

How do I return the sentence instead of its position?

In a supported Excel version, enter =XLOOKUP("*"&A2&"*",Sheet1!A:A,Sheet1!A:A,"Not found",2) in an empty cell. It returns the first matching sentence.

What happens if more than one sentence contains the number?

MATCH and XMATCH return the position of the first match in the search range. XLOOKUP also returns the first matching sentence by default.

Will searching for 123 also find 1234?

Yes. The wildcards match text before and after 123, so 1234 is included. Use a more specific search term if you need to distinguish complete numbers.

Why should I store an identifier with leading zeros as text?

Excel can remove leading zeros from numeric entries. Format A2 as Text before entering an identifier such as 00123 so the formula searches for all of its characters.

Can I search a smaller range instead of the entire column?

Yes. Replace Sheet1!A:A with a range such as Sheet1!A2:A1000. MATCH then returns a position within that range, not the worksheet row number.