ExcelConditional FormattingReadable tables

Excel Conditional Formatting: Highlight Entire Rows, Multiple Conditions, and Weekends

Conditional formatting changes colors automatically based on cell values. This guide covers the basics, formulas that color entire rows, multiple conditions, and highlighting weekends.

2026-11-10

Key points

  1. 1Basics: Home → Conditional Formatting → pick a rule
  2. 2To color whole rows, lock only the column in the formula, as in $C2
  3. 3Use AND and OR for multiple conditions

The basics

Example: color sales cells that are less than 100.

  1. 1

    Select the cells to color

  2. 2

    Click Conditional Formatting on the Home tab

    On Windows you can also press Alt → H → L.
  3. 3

    Choose Highlight Cells Rules → Less Than

  4. 4

    Enter 100, choose a format, and click OK

If you change the numbers later, the colors update automatically.

Common rules

GoalMenu
Cells greater or less than a valueHighlight Cells Rules → Greater Than / Less Than
Cells containing specific textHighlight Cells Rules → Text that Contains
Duplicate valuesHighlight Cells Rules → Duplicate Values
Top or bottom itemsTop/Bottom Rules → Top 10 Items
Show size as a bar in the cellData Bars
Show size as color intensitycolor scale

Highlight an entire row

Color every row whose Status is Not done. It's a common need, but the menus can't do it, so use a formula.

Original table
ProjectRepStatus
Company ASmithDone
Company BJohnsonNot done
Company CWilliamsDone
Not done rows are colored
ProjectRepStatus
Company ASmithDone
Company BJohnsonNot done
Company CWilliamsDone
  1. 1

    Select the whole table except the headers

    Example: A2:C4. Start from a cell in row 2.
  2. 2

    Choose Conditional Formatting → New Rule

    On Windows: Alt → H → L → N.
  3. 3

    Choose "Use a formula to determine which cells to format"

  4. 4

    Enter the formula =$C2="Not done"

  5. 5

    Click Format → Fill, choose a color, and click OK

Where the $ goes

$C2 means lock column C, but let the row change. Every cell in the row checks column C, so the whole row is colored.

The 2 in the formula should match the first row of your selection.

Use multiple conditions

Use AND when all conditions must be true and OR when any one is enough. The steps are the same as for coloring whole rows.

GoalFormula
New York and 100,000 or more=AND($B2="New York",$C2>=100000)
Not done or On hold=OR($D2="Not done",$D2="On hold")

For a different color per condition, create one rule for each.

Highlight weekends

This example has dates in column A. To give Saturday and Sunday different colors, create two rules.

TargetFormula
Saturday and Sunday in one color=WEEKDAY($A2,2)>5
Saturday only=WEEKDAY($A2)=7
Sunday only=WEEKDAY($A2)=1

Color overdue rows

This example has due dates in column D.

=AND($D2<>"",$D2<TODAY())

Blank cells count as earlier than any date, so $D2<>"" excludes them.

Edit or delete rules

ActionMenu
Edit a ruleConditional Formatting → Manage Rules (Alt → H → L → R) → Edit Rule
Change the priorityUse ▲ ▼ in Manage Rules. Rules higher up apply first
Stop lower rulesCheck Stop If True in Manage Rules
Delete rulesConditional Formatting → Clear Rules → from Selected Cells / Entire Sheet

Note

If Manage Rules shows nothing, change "Show formatting rules for" to This Worksheet.

Troubleshooting

QOnly the first row gets colored.

A

The formula locks the row too, as in =$C$2. Clicking a cell in the dialog adds $ to both parts, so press F4 to change it to $C2.

QThe colors are off by one row.

A

The first row of your selection doesn't match the row number in the formula. If you selected from row 2, use $C2.

QNumbers aren't colored even though they meet the condition.

A

The numbers may be stored as text. Look for a green triangle in the top-left corner of the cell and convert them to numbers.

QCopying cells created extra rules.

A

Copying or inserting rows can split rules. Merge them into one in Manage Rules and set Applies to to the whole table.

  • The formula's row number matches the first row of the selection
  • Only the column has a $
  • Text is wrapped in double quotes

Related guides and practice