Formatting Issues

How to Highlight Cells Matching a Selected Word Using Conditional Formatting

Phi Hung VoPhi Hung Vo Nov 11, 2026 871 views

Question details

The user wants to dynamically highlight a range of cells based on whether they match or contain a specific text value entered in a reference search cell.

How to Highlight Cells Matching a Selected Word Using Conditional Formatting
Product
Spreadsheets
Device & OS
not provided
Scenario
Highlighting data dynamically to visually locate specific words or phrases in a large dataset without manually searching.
Observed behavior
Cells in the target range need to change format automatically when their content matches the search word defined in a designated input cell.
Before you start

Identify the exact range of cells you want to highlight and designate a specific empty cell that will act as your dynamic search box.

Solution 1Recommended

Use Formula-Based Conditional Formatting

Apply a custom formula in the conditional formatting rules to highlight cells that either perfectly match or partially contain the target word.

By utilizing a formula-based rule, you can create a dynamic search feature. Changing the text in your designated search cell will instantly update the highlighted cells in your target range without needing to edit the formatting rules again.

1
Select the target range

Click and drag to select the range of cells you want to apply the highlighting to (for example, D8:G16).

2
Open Conditional Formatting

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

3
Choose the formula option

In the New Formatting Rule dialog box, select the option that says 'Use a formula to determine which cells to format'.

4
Enter the match formula

If you want an exact match, enter the formula: =AND($D$21<>"",D8=$D$21). If you want to highlight cells that contain the word anywhere in the text, enter: =AND($D$21<>"",ISNUMBER(SEARCH($D$21,D8))).

5
Set the highlight format

Click the 'Format' button, go to the 'Fill' tab to choose a background color, and click 'OK' twice to apply the rule.

Use Formula-Based Conditional Formatting
Cell Reference Adjustments: Ensure you adjust the cell references in the formula to match your actual data. The reference to the search cell (like $D$21) must be absolute (with dollar signs), while the first cell of your selected range (like D8) must be relative.
Efficient Data Formatting

Easily Highlight Data with WPS Spreadsheet

WPS Spreadsheet provides powerful and intuitive conditional formatting tools to help you visualize your data instantly. You can easily apply custom formulas to highlight exactly what you need without complex setup.

  1. 1. Open your file: Launch WPS Office and open your spreadsheet document.
  2. 2. Select data and access formatting: Highlight your target data range, go to the Home tab, and click Conditional Formatting.
  3. 3. Create a new rule: Select 'New Rule', pick the formula option, and input your exact match or partial match formula.
  4. 4. Apply and test: Set your preferred highlight color, click OK, and type a word in your search cell to see instant results.
Fully compatible with Microsoft Excel conditional formatting rules and formulas.Intuitive graphical interface for managing complex formatting rules.Lightweight software that processes large datasets quickly and smoothly.Free to use with comprehensive data analysis and visualization tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why isn't my conditional formatting formula working?

Ensure that your search cell reference is absolute (using dollar signs, e.g., $D$21) and your target range's first cell reference is relative (e.g., D8). Also, check for accidental trailing spaces in your search cell or your data.

Can I make the conditional formatting ignore case sensitivity?

Yes. The SEARCH function used in the partial match formula is already case-insensitive. If you specifically need a case-sensitive match instead, you should replace the SEARCH function with the FIND function.

How do I clear the conditional formatting rules if I no longer need them?

Select your highlighted range, go to the Home tab, click Conditional Formatting, choose Clear Rules, and then select 'Clear Rules from Selected Cells'.