Formatting Issues

How to Highlight Cells Containing Words from a List in Excel

Olivia MillerOlivia Miller Nov 10, 2026 870 views

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.

How to Highlight Cells Containing Words from a List in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the target range

Highlight the entire range of cells you want to format. For example, select cells A1:AQ2022.

2
Open Conditional Formatting

Navigate to the Home tab on the ribbon, click on 'Conditional Formatting', and select 'New Rule'.

3
Choose the formula option

In the dialog box, select 'Use a formula to determine which cells to format'.

4
Enter the formula

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.

5
Set the format

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 a Formula-Based Conditional Formatting Rule
Case Sensitivity: The SEARCH function is case-insensitive and will highlight partial matches. If you need a case-sensitive search, replace SEARCH with FIND in the formula.
Advanced Spreadsheet Formatting

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. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the dataset and keyword list.
  2. 2. Select the data range: Highlight the cells you want to format (e.g., A1:AQ2022).
  3. 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. 4. Apply the SUMPRODUCT formula: Enter your formula, set your desired fill color, and click OK to instantly highlight matching cells.
Fully supports advanced Excel array formulas like SUMPRODUCT and SEARCH.100% compatible with Microsoft Excel (.xlsx) file formats and conditional formatting rules.Intuitive Conditional Formatting manager for quick adjustments.Free, lightweight, and fast alternative for data analysis.
microsoft office alternative - wps office

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.