← Back to Blog

How to Highlight an Entire Row if a Cell Contains Text in Excel

Highlighting entire rows based on a cell's content makes data patterns immediately visible. Here's how to do it with Conditional Formatting.

Step 1: Select Your Data Range

Select the full range you want to potentially highlight (e.g., A2:E100, not just one column).

Step 2: Open Conditional Formatting

Go to Home → Conditional Formatting → New Rule → Use a formula to determine which cells to format.

Step 3: Write the Formula

To highlight rows where column B contains the word "Pending":

=$B2="Pending"

Lock the column with $ but leave the row number free — this applies across the entire row.

Highlight Row if Cell Contains Partial Text (Case-Insensitive)

=ISNUMBER(SEARCH("pending",$B2))

SEARCH is case-insensitive and returns the position of the text, or an error if not found. ISNUMBER converts that to TRUE/FALSE.

Highlight Row if Cell Contains Any of Multiple Words

=OR(ISNUMBER(SEARCH("Pending",$B2)),ISNUMBER(SEARCH("Review",$B2)))

Highlight Row Based on Multiple Column Conditions

=AND($C2="High",$D2

Highlights rows where priority is "High" AND the due date has passed.

Step 4: Choose Your Highlight Color

Click Format → Fill, pick a color, and click OK twice.

FAQ

Why does my Conditional Formatting only highlight one cell?

Make sure you selected the entire row range before creating the rule, and that the column reference uses a $ before the letter (e.g., $B2, not B2).

How do I highlight a row if a cell is not empty?

Use the formula =$B2<>"" to highlight rows where column B has any value.

How do I highlight rows with multiple conditions?

Use AND() or OR() inside your formula: =AND($B2="Done", $C2>10)