Skip to content
AnIntent

How to Highlight a Whole Row in Google Sheets Based on One Cell's Value

Use a conditional formatting custom formula like =$B1="Yes" to color an entire Google Sheets row, and fix the rule when it colors the wrong cells.

AnIntent Editorial · · 4 min read

Person working on a laptop with a spreadsheet outdoors
Photo by Gorilla ROI Data Connector on Unsplash
In this article
  1. Set up the row rule on a computer
  2. Why the dollar sign before B matters
  3. Set up the rule on Android
  4. Why your rule isn't working
  5. Where wildcards fit, and where they don't
Share this article

To highlight a whole row in Google Sheets based on one cell's value, for example turning a row green when column B says "Yes", you need conditional formatting with a custom formula. The trick is a single dollar sign in the formula. Here's how to set it up on a computer and on Android, and how to fix it when only one column lights up.

Set up the row rule on a computer

These steps follow Google's conditional formatting help page. When it was retrieved in October 2026, the page listed the menu path as Format, then Conditional formatting.

  1. Open the spreadsheet in Google Sheets.
  2. Select the whole range you want colored, for example columns A to E (A:E).
  3. Click Format > Conditional formatting. A toolbar opens on the right.
  4. Under the Format cells if drop-down, click Custom formula is. If a rule already exists, click it or click Add new rule first.
  5. Click Value or formula and enter the formula, written for the first row of your range:
=$B1="Yes"
  1. Under Formatting style, pick a fill color, such as green.
  2. Click Done.

This is Google's own whole-row example: with A:E selected, =$B1="Yes" turns the whole row green if column B is "Yes".

If column B is filled from a fixed list like Yes / No / Pending, each status can get its own rule and color.

Why the dollar sign before B matters

Google's help page covers this in one sentence: add dollar signs so the formatting uses absolute references rather than relative ones. Here is our explanation of what that means for row highlighting.

You write the formula once, for the top-left cell of the range. Sheets then shifts it for every other cell. Without any dollar signs, =B1="Yes" checked from cell C1 becomes =C1="Yes", from D1 becomes =D1="Yes", and so on. Each cell ends up checking a different column, so only column B colors correctly.

$B1 locks the column but leaves the row free. Every cell in row 1 checks B1, every cell in row 2 checks B2, and so on. Each row looks at column B of its own row, which is exactly what you want.

Formula Column Row Result
=B1="Yes" moves moves Each cell checks a different column
=$B1="Yes" locked moves Each row checks its own B cell
=$B$1="Yes" locked locked Every cell checks B1 only

Formula variants for common trackers

The same pattern works for other conditions. Lock the column, leave the row free.

=$B1="Yes"

Exact match: color the row when column B says Yes.

=$C1<TODAY()

Dates: color the row when the date in column C is before today, useful for overdue tasks.

If you have a header row

Start the range at row 2 (for example A2:E) and write the formula for row 2, so =$B2="Yes". The formula always refers to the first row of whatever range you selected. If you select from row 2 but write $B1, every row checks the cell above it and the colors land one row off. To keep the header visible while you scroll, see how to freeze rows in Google Sheets.

Set up the rule on Android

The Android version of Google's help page uses slightly different labels:

  1. Open the Google Sheets app and select the range.
  2. Tap Format > Conditional formatting. A panel opens.
  3. If a rule already exists, tap Add first.
  4. Under the Format cells if drop-down, tap Custom formula. On Android it is not labeled "Custom formula is".
  5. Tap Value or formula and enter the formula, such as =$B1="Yes".
  6. Tap Done.

To see existing rules, tap Format > Conditional formatting and choose Selected range (rules that touch your selection) or All (every rule on the sheet) at the top.

Google publishes a separate iPhone and iPad version of the same help page. We haven't covered it here, so check that version for iOS labels.

Why your rule isn't working

Go through these in order:

  • Only one column is colored. The column isn't locked. Change B1 to $B1.
  • Colors are one row off. The row number in the formula doesn't match the first row of the range. If the range starts at row 2, the formula needs $B2.
  • The formula points to another tab. Per Google's help page, custom formulas can only reference the same sheet. To check a cell on another sheet, wrap the reference in INDIRECT.
  • A different color wins. Google says rules are evaluated in the order listed, and the first rule that's true sets the format. Drag your row rule above any conflicting rule.
  • Rules appeared in places you didn't expect. Copying and pasting from a range that has formatting rules applies those rules to the pasted data. Point to the unwanted rule in the sidebar and click Remove. If things get messy, you can restore an earlier version of the sheet.

Where wildcards fit, and where they don't

The *, ? and ~ wildcards belong to the built-in Text contains and Text does not contain conditions, not to custom formulas, according to Google:

Wildcard Matches Example
? Any single character "a?c" matches "abc" but not "ac" or "abbc"
* Zero or more characters "a*c" matches "abc", "ac" and "abbc" but not "ab" or "ca"
~ Escapes a wildcard "a?c" matches "a?c" but not "abc" or "a?c"

Those conditions test each cell's own contents. Applied to A:E, they color whichever individual cells match, not the whole row, so for row highlighting stick with a custom formula.

If you want to flag repeated values rather than statuses, that's a COUNTIF rule, covered in how to highlight duplicates in Google Sheets.

Common questions

Why does only one column change color instead of the whole row?

The column in your formula isn't locked. Use $B1 instead of B1 so every cell in the row checks column B of its own row.

Can a conditional formatting rule check a cell on another sheet?

Not directly. Google's help page says custom formulas can only reference the same sheet; use INDIRECT to reference another sheet.

What happens if two rules apply to the same row?

Google says rules are evaluated in the order listed and the first true rule sets the format. Drag rules in the sidebar to change the order.

Does copying cells copy the conditional formatting too?

Yes. Per Google, copying and pasting from a range with formatting rules applies those rules to the pasted data.

Is the option named differently on Android?

Yes. On Android you tap Custom formula in the Format cells if drop-down, rather than Custom formula is as on desktop.

3D render of cloud computing concept
How-to

Google Drive Access Expiration: What Google Says Is Supported

What Google's own announcements say about expiring access on Drive files, shared drives and folders, and where the official steps live.

· 2 min

More in Cloud & Productivity Software