Function Problems

Find Cells Containing Keywords with Excel Partial-Match Formulas

Huma Ashraf ChHuma Ashraf Ch Nov 25, 2026 868 views

Question details

Find keywords within longer cell text and return or count partial matches.

Find Cells Containing Keywords with Excel Partial-Match Formulas
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains car-model queries and a list of keywords such as Ford, Honda, Toyota, or Vauxhall.
Observed behavior
The user wants formulas to recognize a keyword within a query rather than require an exact cell match.
Before you start

Arrange the queries and keywords in separate columns, and decide whether you want to return a label, count matching queries, or retrieve a related value. Make sure the keyword cells used in the formulas are not blank.

Solution 1Recommended

Return a label for a keyword found in each query

Use SEARCH and LOOKUP to check each query against a keyword list and return its associated label.

1
Set up the columns

Enter queries in column A, keywords in D2:D3, and their corresponding labels in E2:E3. For example, put Ford and Honda in D2:D3 and their desired labels in E2:E3.

2
Enter the formula

Select B2 and enter =IFERROR(LOOKUP(2,1/SEARCH($D$2:$D$3,A2),$E$2:$E$3),"").

3
Copy the formula down

Drag the fill handle from B2 down column B to check the remaining queries. Expand both fixed ranges if your keyword list contains more than two entries.

Return a label for a keyword found in each query
When multiple keywords match: The formula returns the label for the last matching keyword in the list. SEARCH is not case-sensitive, and IFERROR returns a blank when no keyword matches.
Work with spreadsheets in WPS Office

Find keyword matches in WPS Spreadsheets

Use SEARCH and LOOKUP in WPS Spreadsheets to identify keywords within longer queries and return corresponding labels.

  1. 1. Open your workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Arrange the data: Place queries in column A, keywords in D2:D3, and corresponding labels in E2:E3. Keep the keyword cells nonblank.
  3. 3. Enter the formula: Select B2 and enter =IFERROR(LOOKUP(2,1/SEARCH($D$2:$D$3,A2),$E$2:$E$3),"").
  4. 4. Fill and save: Drag the fill handle down column B, then use File > Save As to save the workbook in XLSX format.
Find partial keyword matches with spreadsheet formulasOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceGet started with the free version of WPS Office
microsoft office alternative - wps office

Frequently Asked Questions

How do I check whether a cell contains a specific keyword?

If the text is in A2 and the keyword is in D2, enter =ISNUMBER(SEARCH(D2,A2)). It returns TRUE when the keyword appears anywhere in the cell.

Are these keyword searches case-sensitive?

SEARCH, COUNTIF, and VLOOKUP with wildcards are not case-sensitive. To perform a case-sensitive check for one keyword, use =ISNUMBER(FIND(D2,A2)).

What happens if a query contains more than one keyword?

The LOOKUP and SEARCH formula returns the label for the last matching keyword in the keyword list. Change the list order if you want a different matching keyword to take priority.

How can I hide the #N/A error when VLOOKUP finds no match?

Wrap the formula in IFERROR, for example: =IFERROR(VLOOKUP("*"&D2&"*",A$2:B$9,2,FALSE),""). This returns a blank instead of an error.