Function Problems

Find Partial Text Matches in Excel with VLOOKUP or XLOOKUP

Bushra ParveenBushra Parveen Nov 18, 2026 871 views

Question details

Find a shorter location name within a longer address or description and return the corresponding value from a lookup table.

Find Partial Text Matches in Excel with VLOOKUP or XLOOKUP
Product
Microsoft Excel
Device & OS
not provided
Scenario
A cell contains a location name, and the lookup table contains longer text entries that may include that name.
Observed behavior
The user wants a formula that finds a table entry containing the location name and returns its associated value.
Before you start

Check that the shorter lookup text is in L15, the longer searchable entries are in C3:C33, and the values to return are in E3:E33. Adjust these references to match your worksheet and make sure L15 is not blank.

Solution 1Recommended

Use VLOOKUP with wildcards to find a partial text match

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

1
Select a result cell

In Excel, click the cell where you want the matching value to appear.

2
Enter the VLOOKUP formula

Type =VLOOKUP("*"&L15&"*",$C$3:$E$33,3,FALSE) and press Enter.

3
Check the result

Compare the returned value with the first entry in C3:C33 that contains the text in L15. Change the table range or column index 3 if your data is arranged differently.

Use VLOOKUP with wildcards to find a partial text match
How the match works: The asterisks match text before and after the location name. VLOOKUP returns the first matching row; if no match is found, it returns #N/A.
WPS Spreadsheets

Find partial text matches in WPS Spreadsheets

Use a wildcard VLOOKUP formula in WPS Spreadsheets to find a location name inside longer text and return its associated value.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your workbook.
  2. 2. Check the lookup columns: Confirm that L15 contains the shorter location name, C3:C33 contains the longer text, and E3:E33 contains the values to return.
  3. 3. Enter the formula: Select an empty result cell, type =VLOOKUP("*"&L15&"*",$C$3:$E$33,3,FALSE), and press Enter.
  4. 4. Review and save: Check the returned value, then choose File > Save to save your changes.
Find text anywhere within a lookup cell using wildcardsOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar spreadsheet interfaceWork with lookup formulas in a free office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does VLOOKUP return #N/A for my partial match?

Check that L15 contains the shorter text and that the longer entries are in the first column of the VLOOKUP range. Also check for spelling differences or extra spaces, and use FALSE as the final argument.

What happens if more than one address contains the location name?

Both formulas shown return the first match they find in the search range. Review the matching rows if the location name may appear in more than one entry.

Can I search for a literal asterisk or question mark?

Yes. In Excel wildcard searches, place a tilde before a literal wildcard: use ~* for an asterisk and ~? for a question mark. Use ~~ to match a literal tilde.

Will these formulas work if L15 contains the full address instead?

Not for finding a shorter table entry inside that address. The formulas search for the text in L15 within the cells in the lookup column, so the shorter text needs to be in L15 for this setup.