Highlight Cells Containing Specific Text

Excel Formulas › Conditional Formatting

All versionsSEARCH

Flag every cell that mentions a keyword — “urgent,” a product code, an error word. An ISNUMBER + SEARCH rule highlights partial matches anywhere in the text, and you can point it at a search box for a live filter feel.


Quick formula: select your range, then add a formula CF rule:
=ISNUMBER(SEARCH("urgent", A1))
SEARCH finds the keyword anywhere in the cell (case-insensitive); ISNUMBER turns a found position into TRUE and a not-found error into FALSE.

Functions used (tap for the full reference guide):

The example

Notes containing “urgent” are flagged.

A
1Note
2URGENT: call back
3Routine follow-up
4Mark as urgent

The formula

The conditional-formatting rule:

=ISNUMBER(SEARCH("urgent", A1)) // matches urgent / URGENT / Urgent anywhere

How it works

SEARCH locates the text; ISNUMBER converts the result to TRUE/FALSE:

  1. Select the range and add a formula rule: =ISNUMBER(SEARCH("urgent", A1)).
  2. SEARCH returns the position of the keyword if found, or a #VALUE! error if not. It’s case-insensitive and matches partial text.
  3. ISNUMBER turns a real position into TRUE (highlight) and the error into FALSE (skip).
  4. Pick a fill and click OK — every cell mentioning the keyword lights up.

Make it interactive: put the keyword in a cell (say F1) and reference it: =ISNUMBER(SEARCH($F$1, A1)). Now typing in F1 re-highlights instantly — a live keyword filter. Use FIND instead of SEARCH for case-sensitive matching.

Try it: interactive demo

Live demo

Type a keyword; matching notes highlight.

Variations

Match a search box

Reference a keyword cell:

=ISNUMBER(SEARCH($F$1, A1))

Case-sensitive

Use FIND instead of SEARCH:

=ISNUMBER(FIND("URGENT", A1))

Any of several words

OR a few keywords:

=OR(ISNUMBER(SEARCH("urgent",A1)), ISNUMBER(SEARCH("asap",A1)))

Pitfalls & errors

You need ISNUMBER. SEARCH alone returns a number or an error, not TRUE/FALSE. Wrapping it in ISNUMBER is what makes the rule work.

SEARCH vs FIND. SEARCH is case-insensitive and allows wildcards; FIND is case-sensitive and literal. Choose deliberately.

Empty keyword matches everything. If you reference a search cell and it’s blank, SEARCH finds the empty string in every cell — guard with $F$1<>"" if needed.

Practice workbook

📊
Download the free Highlight Cells Containing Specific Text practice workbook
A notes sheet with the keyword-highlight rule, the search-box, case-sensitive, and multi-word variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

How do I highlight cells containing specific text in Excel?
Select the range and add a formula rule =ISNUMBER(SEARCH("keyword", A1)). SEARCH finds the text anywhere in the cell (case-insensitive) and ISNUMBER turns it into TRUE/FALSE.
How do I make the keyword come from a cell?
Reference the cell: =ISNUMBER(SEARCH($F$1, A1)). Typing a new keyword in F1 re-highlights the matches instantly.
How do I make the match case-sensitive?
Use FIND instead of SEARCH: =ISNUMBER(FIND("URGENT", A1)) matches only the exact casing.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Check if a cell contains text · Highlight with a formula · Highlight entire row

Function references: SEARCH · ISNUMBER