Google Sheets: Highlight a Whole Row Based on One Cell
In this article
You can highlight an entire row in Google Sheets based on the value in a single cell by applying conditional formatting to the full row range and writing a custom formula that locks the column with a dollar sign. For example, to shade every row where column A says "Done", select your data range, open Format > Conditional formatting, choose Custom formula is, and enter =$A1="Done". The key is the $ before the column letter: it holds the test on column A while the row number stays relative, so each row is judged by its own cell in column A but the whole row gets the colour.
This is one of the most useful tricks in Sheets because it turns a flat table into something you can scan at a glance — overdue tasks, flagged accounts, completed orders, low stock. Once you understand the formula pattern you can reuse it for text, numbers, dates, checkboxes and blank cells.
What You'll Need
- A Google account with access to Google Sheets (the free version is fine).
- A sheet with data laid out in rows, where one column holds the value you want to test.
- Edit permission on the file — conditional formatting is read-only for viewers and commenters.
Step-by-Step
- Decide which column is the trigger. Work out the column holding the value that should drive the colour, such as a Status column in column A or a Due Date column in column C. Note its letter.
- Select the range you want coloured. Click the first cell of your data (not the header row unless you want headers coloured too), then hold Shift and click the last cell, or drag across. To colour rows A to D for data in rows 2 to 100, select
A2:D100. You can also type the range into the Apply to range box after the panel opens. - Open the formatting panel. Go to Format > Conditional formatting. A sidebar opens on the right with the range already filled in. Menu labels can differ slightly between the web app and the mobile apps, but the wording here is stable in the desktop browser version — the steps below describe the desktop experience.
- Choose the rule type. In the Format cells if dropdown, scroll to the bottom and pick Custom formula is. This is the only rule type that lets you test one cell and colour others.
- Write the formula with a locked column. In the value box, type your formula starting with
=. Use the first cell of your selected range as the reference, with a dollar sign before the column letter only. Examples:- Text match:
=$A2="Complete" - Number greater than:
=$C2>1000 - Cell is blank:
=$A2="" - Checkbox ticked:
=$A2=TRUE - Contains a word:
=SEARCH("urgent",$A2)
- Text match:
- Pick your formatting. Under Formatting style, click the fill colour bucket and choose a background colour. You can also set bold text, text colour, strikethrough or italics for a stronger signal.
- Check the preview. The panel shows a small preview strip and the affected rows light up on the sheet as you type. If nothing changes, the formula is wrong — see Troubleshooting.
- Click Done. The rule is saved and applied live. Close the sidebar to see the full effect.
- Add more rules for other values. Repeat from step 3 with the same range so each status gets its own colour. Order matters: rules are evaluated top to bottom and the first matching rule wins unless you tick the box to stop. Drag rules in the sidebar to reorder them.
- Test with a real change. Type a new value into column A in an uncoloured row. The row should colour instantly. Delete the value and the colour should disappear.
Common Mistakes
Leaving out the dollar sign. =A2="Done" in a range that spans several columns makes each cell test itself, so you get patchy colouring instead of whole rows. You need =$A2="Done".
Locking the row too. Writing =$A$2="Done" freezes the test on row 2 forever, so every row is coloured according to what A2 contains. Only the column gets the dollar sign.
Starting the formula on the wrong row. If your range is A2:D100, the formula must start at row 2. Starting at $A1 shifts every test one row up, so colours appear above the rows that triggered them.
Selecting a range that excludes the trigger column. The test column does not have to be inside the coloured range, and that is fine — but many people accidentally deselect it. Colour A2:D100 while testing column F if you like; Sheets can read cells outside the applied range.
Colouring the header row by accident. Include row 1 in the range only if you want the header to react. Usually you do not.
Forgetting relative text case. Sheets text comparisons are case-insensitive by default, so ="done" matches "Done" and "DONE". If you need an exact case match, use =EXACT($A2,"Done").
Using a rule from the wrong category. The preset options like "Text contains" only colour the cells in the range, not the whole row, so custom formula is the correct choice here.
Tips
Use one colour per meaning and keep it consistent — green for good, amber for pending, red for problem. More than three or four colours becomes noise.
For checkbox columns, insert checkboxes via Insert > Checkbox and test =$A2=TRUE. A ticked box turns the row green and an unticked one leaves it plain, which makes it a simple done-list.
Combine conditions with AND and OR for smarter rules, such as =AND($B2<TODAY(),$C2<>"Done") to flag anything past its due date that is still open.
Reference a cell instead of hard-coding text — for example =$A2=$F$1 — so you can change the target value in F1 without editing the rule.
Only the first column of the test needs the dollar sign, but adding it to the value in F1 prevents the reference drifting down the rows.
Copy rules between sheets by setting up the range and formula again; conditional formatting does not copy with normal cell copy and paste across files. Duplicate the sheet to carry rules over.
If colours vanish when you sort or filter, check whether the rule range still covers the new rows — sorting moves values, not rules, so a range that stops at row 50 will not colour row 51.
Troubleshooting
Nothing happens at all. Click a coloured cell and look at the sidebar. If the rule is missing, the range is wrong or you clicked Cancel instead of Done. Reopen the panel and confirm the rule is listed.
Only some cells colour, not the full row. Almost always a missing dollar sign. Check that the formula reads =$A2 and not =A2.
Colours are offset by one row. The formula row must equal the first row of the range. Change $A1 to $A2, or adjust the range to start at row 1.
The test value looks right but does not match. Hidden spaces are the usual culprit. Clean the data with TRIM, or test with =TRIM($A2)="Done". Numbers stored as text also fail numeric tests; convert them with Format > Number.
A row that should be red stays green. Another rule higher in the list is catching it first. Reorder the rules in the sidebar, or tick the stop-if-true option on the rule you want to win.
You cannot edit anything. If the file is view-only or shared as Viewer, conditional formatting is locked. Ask the owner for edit access, or make a copy via File > Make a copy.
The formula is rejected. Sheets auto-corrects some typed quotes into curly quotes, which break comparisons. Retype the formula with plain straight quotes, or type the quotes last.
Frequently Asked Questions
Can I colour the whole row including the trigger column?
Yes. Include the trigger column inside the applied range, for example A2:D100 when testing column A, and the trigger cell will colour along with the rest of the row.
Does this work in the Google Sheets mobile app?
Yes. Open the sheet in the Android or iOS app, tap Format in the toolbar (you may need to scroll the toolbar), choose Conditional formatting, then set the range, pick Custom formula and enter the same locked-column formula. Exact labels vary by app version.
Why does my formula need a dollar sign?
The dollar sign anchors the column so every cell in the row looks at the same column. Without it, each cell compares itself to the value you typed rather than to its neighbour in the trigger column.
Can I highlight rows in a different sheet?
No. Conditional formatting rules only apply to ranges within the sheet where you create them. Referencing cells from another sheet inside a formula is also not supported for this purpose; bring the value into a helper column first with a formula, then test that column.
What happens if I add new rows below my range?
New rows outside the applied range will not be formatted. Edit the range in the sidebar to extend it, or select extra empty rows when you first set the rule so future entries are covered.
Can I apply the same rule to several non-adjacent ranges?
Not in one rule. Create a separate rule for each range, using the same formula adjusted to that range's first row. Keep timings and thresholds in mind and recheck after any range edit.