How to Highlight Cells Containing Words from a List in Excel
Question details
The user needs to search a large data range for partial matches to any word located in a separate keyword list and highlight the matching cells using conditional formatting.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Applying conditional formatting to a large dataset to visually identify cells that contain any text string from a predefined list of keywords.
- Observed behavior
- Requires a formula or rule setup to automate the highlighting process without manually creating individual rules for every single word in the list.
Ensure your keyword list is placed in a clear, separate range without any blank cells, as empty cells in the criteria range can cause the formula to highlight incorrect data.
Use a Formula-Based Conditional Formatting Rule
The most efficient way to check a cell against an entire list of words is by combining the SUMPRODUCT, ISNUMBER, and SEARCH functions in a single conditional formatting rule.
This method uses an array-style evaluation. The SEARCH function looks for the keywords in the target cell, ISNUMBER converts the results to TRUE/FALSE, and SUMPRODUCT adds them up. If the result is greater than 0, a match is found and the formatting is applied.
Highlight the entire range of cells you want to format. For example, select cells A1:AQ2022.
Navigate to the Home tab on the ribbon, click on 'Conditional Formatting', and select 'New Rule'.
In the dialog box, select 'Use a formula to determine which cells to format'.
In the formula bar, input: =SUMPRODUCT(--ISNUMBER(SEARCH($L$1:$L$50,A1)))>0. Replace $L$1:$L$50 with the actual absolute reference to your keyword list, and A1 with the top-left cell of your selected range.
Click the 'Format' button, go to the Fill tab to choose a highlight color, click OK, and then OK again to apply the rule.

Use the 'Text that Contains' Rule for Individual Words
If you only have a few words to search for (e.g., 3 to 5 keywords), you can create separate standard rules for each word without using complex formulas.
Highlight Cells Effortlessly with WPS Spreadsheet
WPS Spreadsheet offers robust conditional formatting and advanced formula support, allowing you to highlight cells based on custom lists seamlessly. It provides a familiar interface to easily manage large datasets and complex rules.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the dataset and keyword list.
- 2. Select the data range: Highlight the cells you want to format (e.g., A1:AQ2022).
- 3. Create a new formatting rule: Go to the Home tab, click 'Conditional Formatting', select 'New Rule', and choose 'Use a formula to determine which cells to format'.
- 4. Apply the SUMPRODUCT formula: Enter your formula, set your desired fill color, and click OK to instantly highlight matching cells.

Frequently Asked Questions
Why is the conditional formatting highlighting every cell, even empty ones?
This usually happens if your keyword list range contains blank cells. The SEARCH function evaluates an empty cell as a match for everything. Ensure your formula range (e.g., $L$1:$L$50) only covers cells that actually contain text, or use dynamic named ranges.
Can I make the search case-sensitive?
Yes. You can replace the SEARCH function with the FIND function in your formula: =SUMPRODUCT(--ISNUMBER(FIND($L$1:$L$50,A1)))>0. The FIND function is strictly case-sensitive.
Will this formula highlight exact matches only?
No, the SEARCH function looks for partial matches. For example, if your list contains 'cat', it will highlight cells containing 'cat', 'caterpillar', and 'scatter'. To match exact words only, you would need a different formula utilizing exact match logic, such as COUNTIF.




