Find Cells Containing Keywords with Excel Partial-Match Formulas
Question details
Find keywords within longer cell text and return or count partial matches.

- 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.
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.
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.
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.
Select B2 and enter =IFERROR(LOOKUP(2,1/SEARCH($D$2:$D$3,A2),$E$2:$E$3),"").
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.

Count matching queries or return the first matching value
Use wildcard formulas when you want to search a range for one keyword at a time.
Find keyword matches in WPS Spreadsheets
Use SEARCH and LOOKUP in WPS Spreadsheets to identify keywords within longer queries and return corresponding labels.
- 1. Open your workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 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. Enter the formula: Select B2 and enter =IFERROR(LOOKUP(2,1/SEARCH($D$2:$D$3,A2),$E$2:$E$3),"").
- 4. Fill and save: Drag the fill handle down column B, then use File > Save As to save the workbook in XLSX format.

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.




