Function Problems

Find Embedded Text with VLOOKUP in Excel and WPS Spreadsheets

Huda QurayshiHuda Qurayshi Dec 2, 2026 868 views

Question details

Find a lookup value embedded within a longer text string without changing the source data.

Find Embedded Text with VLOOKUP in Excel and WPS Spreadsheets
Product
Microsoft Excel and WPS Spreadsheets
Device & OS
not provided
Scenario
A lookup value such as 314-645 appears within a longer string in the first column of a lookup range.
Observed behavior
The formula needs to identify the embedded text and return a value from the matching row.
Before you start

Identify the cell containing the lookup text and the columns containing the source strings and return values. The examples assume the lookup value is in A2, source strings are in Sheet2 column A, and return values are in Sheet2 column B.

Solution 1Recommended

Use VLOOKUP with wildcards to match embedded text

Use this formula when the source text is in the first column of the lookup range and the return value is to its right.

1
Select the result cell

Click the cell where you want to display the matching value.

2
Enter the formula

Type =VLOOKUP("*"&A2&"*",Sheet2!A:B,2,FALSE) and press Enter. The asterisks allow text before and after the value in A2, while FALSE enables an exact wildcard match.

3
Check the result

Compare the returned value with the first matching row on Sheet2. Adjust A2, Sheet2!A:B, or the column number 2 if your data is arranged differently.

Use VLOOKUP with wildcards to match embedded text
First match only: VLOOKUP returns the first matching row. An empty lookup cell can match unintended text, so make sure A2 contains the value you want to find.
Find embedded text in spreadsheets

Look up embedded text in WPS Spreadsheets

Use a wildcard VLOOKUP formula in WPS Spreadsheets to find a value within a longer text string and return data from the matching row.

  1. 1. Open the workbook: Open WPS Spreadsheets and select Open to load your workbook.
  2. 2. Identify the lookup columns: Locate the lookup value and the source and return columns. For this example, use A2 and Sheet2 columns A and B.
  3. 3. Enter VLOOKUP: Click the result cell, enter =VLOOKUP("*"&A2&"*",Sheet2!A:B,2,FALSE), and press Enter.
  4. 4. Review and save: Check the returned value against the first matching row, then select Save to keep the formula.
Find embedded text without editing the source dataUse familiar VLOOKUP, INDEX, and MATCH formulasOpen and edit Microsoft Excel XLSX and XLS filesWork in a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula return #N/A?

No matching text may exist in the lookup column. Check the value in A2 and the source range on Sheet2 for differences such as extra spaces or punctuation.

What happens if more than one source string contains the lookup value?

Both VLOOKUP and MATCH return the first match in the lookup range. Check the source rows if multiple strings could contain the same value.

Can I return a value from a column to the left of the matching text?

Yes. Use INDEX and MATCH with the return column in INDEX and the text column in MATCH, such as =INDEX(Sheet2!A:A,MATCH("*"&A2&"*",Sheet2!B:B,0)).

What if my lookup text contains an asterisk or question mark?

An asterisk or question mark is treated as a wildcard. To match it literally, escape it with a tilde. For a cell value, use SUBSTITUTE to escape tildes first, then asterisks and question marks before adding the surrounding wildcards.