Google Sheets Conditional Formatting Highlights the Wrong Rows

Published by AppFixLab · Published · Updated

Quick answer

When a conditional formatting formula highlights the row above or below the one you expect, the first row of its formula often does not match the first row of its Apply to range. Check both together before changing the condition.

For an applied range of A2:D100, a status rule based on column B should normally start with:

=$B2="Done"

The $ locks column B; row 2 stays relative so each row checks its own status.

Diagnose an offset

Suppose the applied range begins at A2, but your formula references B3. As formatting evaluates subsequent rows, the condition refers to a row below. If row 10 appears highlighted based on row 11’s value, this is a useful clue.

Apply to rangeIntended formulaProblem example
A2:D100=$B2="Done"=$B3="Done" (one row lower)
A1:D100=$B1="Done"=$B2="Done" (one row lower)

Fix the reference step by step

  1. Select one wrongly formatted row.
  2. Open Format → Conditional formatting and find the responsible rule.
  3. Note the first cell of Apply to range.
  4. Make the custom formula reference the matching first row.
  5. Use $B2, not B2, if the condition must always read column B across several formatted columns.
  6. Check a row at the top, middle and bottom of the range.

What the dollar signs change

  • B2: column and row can shift.
  • $B2: column B stays fixed, row changes.
  • B$2: row 2 stays fixed, column can shift.
  • $B$2: every formatted cell checks B2.

The third and fourth forms are not wrong in general; they are usually wrong for a per-row status rule.

Other causes of unexpected formatting

Multiple overlapping rules can apply to a single row. A text cell containing an extra space may not equal "Done". Filters and hidden rows can also make visual inspection confusing; compare the actual row numbers and displayed values instead of judging by position alone.

Example: Entire row for overdue tasks

With due dates in C and completed status in D, use A2:D100 and a custom formula such as:

=AND(ISNUMBER($C2),$C2<TODAY(),$D2<>"Done")

This illustrative rule excludes blank/non-date values stored as text. Adjust it to your business definition and date representation; it is not a universal rule for every sheet.

Sources


Editorial note: Examples are illustrative and based on the linked documentation; no firsthand product test is claimed.

Related guides