Independent tech help — Sylvan Lake, AlbertaChecked against vendor documentationBrowse every fix ↗
The Tech Cell
Tech problems, solved
Computers & devices6 min

Google Sheets Conditional Formatting: How to Set Rules

Conditional formatting re-colors cells in Google Sheets whenever their values change. Here is the Format menu path, the rule options, and the limits worth knowing.

Google Sheets Conditional Formatting: How to Set Rules
Google Sheets conditional formatting lives under Format › Conditional formatting. Select your cells first, pick a condition under "Format cells if…", choose a fill color under "Formatting style", then click Done. The rule re-applies itself every time one of those values changes.

The point of a conditional format is that you set it once and stop thinking about it. A cell turns red because it dropped below a number you care about, not because you remembered to color it in. Google calls these rules, and a range can carry several at a time.

Two things are worth knowing before you start. A rule only changes how a cell looks, never what it contains. And the rule belongs to a range, not to a cell, so the range you have selected when you open the panel is the range the rule will cover.

Where Google Sheets conditional formatting lives

1. Select the cells, rows, or columns you want the rule to cover. Doing this first saves you typing the range by hand later.

2. Open the Format menu and choose Conditional formatting. It sits near the bottom, just above Alternating colors.

The Format menu open in Google Sheets with Conditional formatting highlighted
Conditional formatting sits between Convert to table and Alternating colors in the Format menu.

3. A panel headed Conditional format rules opens on the right. Check the Apply to range box matches what you selected, and edit it there if it does not.

The Conditional format rules panel showing Single color and Color scale tabs, an Apply to range box, and a Format cells if dropdown
The panel opens on the Single color tab with a condition already filled in, so change it rather than assuming it is blank.

4. Open the Format cells if… dropdown and pick your condition. The list is longer than the panel is tall, so scroll it: text conditions sit at the top, date conditions in the middle, and the numeric comparisons below those.

The Format cells if dropdown expanded, listing text, date and numeric conditions
The dropdown scrolls. Greater than, Less than and the other numeric tests sit below the date options.

5. Type the value the condition compares against, then set the look under Formatting style — bold, italic, underline, strikethrough, text color, fill color, or any combination. Click Done.

A rule set to Greater than 2300 with a custom green formatting style applied
A finished single-color rule: a condition, a value, and a style. Done saves it.

The formatting appears immediately, and Add another rule at the foot of the panel starts the next one on the same range.

Color scales instead of a single color

The Color scale tab, next to Single color at the top of the panel, does something different. Rather than testing each cell against one condition, it shades the whole range as a gradient, so the largest numbers sit at one end of a color ramp and the smallest at the other.

You set a Minpoint and a Maxpoint, and optionally a Midpoint, choosing both the value category and the color for each. Leave the midpoint on None for a straight two-color ramp.

The Color scale tab showing a preview gradient with Minpoint, Midpoint and Maxpoint controls
Color scale replaces the condition with a gradient across the whole range.

A color scale is the better choice when you want to see the shape of a column at a glance. A single-color rule is better when there is a real threshold — a budget, a pass mark, a deadline.

Custom formula rules

Choosing Custom formula is from the condition dropdown lets you write any formula that returns TRUE or FALSE, which is how you format a whole row based on one column. Google's own example is =$B1="Yes", applied to a range covering several columns: the dollar sign locks the test to column B while the row reference shifts down the range.

That absolute-reference trick is the part people get wrong. Without the $, the reference moves sideways as well as down, and the rule tests a different column in every column of your range.

One documented limit: a custom formula can only refer to the sheet the rule is on. To test a value on another tab you have to wrap the reference in INDIRECT.

Text conditions accept wildcards, which saves a formula in simple cases. A question mark stands for exactly one character, an asterisk for any number of them, and a tilde escapes a literal ? or *.

Managing rules once they exist

Reopen Format › Conditional formatting with a cell in the range selected and the panel lists every rule covering it. Click a rule to edit it, drag rules to reorder them, and hover a rule to reveal the remove icon.

Two saved rules listed in the panel, one green and one red, with the Remove rule tooltip showing
Both rules cover B2:D7. Hovering a rule reveals the remove icon; the tooltip reads Remove rule.

Order matters. Google documents rules as being checked in the order they are listed, with the first one that is true setting the format — so a broad rule sitting above a narrow one will mask it. Dragging the narrow rule to the top fixes that.

One more thing worth knowing: copying and pasting cells carries their conditional formatting rules along with them.

What conditional formatting does not do

It does not change values. A cell shaded red still holds the same number, and formulas, sorting and the sum in the status bar all read it exactly as before.

It is not Alternating colors, the menu item directly beneath it. That one stripes a range on a fixed pattern regardless of what the cells contain, which is a presentation choice rather than a rule.

And it does not move anything. Conditional formatting re-colors cells where they sit; it will not reorder your rows, group them, or hide the ones that fail the test.

Common questions

Can one rule cover several columns? Yes. Apply to range accepts a block such as B2:D7, and the condition is tested against each cell in it independently. If you want the whole row to react to one column instead, that is the custom formula case above.

What happens when two rules match the same cell? Google's documentation describes rules being evaluated in list order, with the first true rule setting the format. Reorder by dragging if the wrong one is winning.

Does this work in the mobile apps? Google announced the ability to add and edit conditional formatting rules in the Sheets app for Android. Google's own help pages document the desktop path only, and do not describe creating rules in the iPhone and iPad app, so treat a phone as a place to see your rules working rather than a place to build them.

If the option isn't there

Google Sheets conditional formatting is an editing feature, so the first thing to check is that you have edit access to the file rather than view or comment access. The second is that you are actually in Sheets — a table inside a Google Doc has its own, much smaller formatting menu.

If the menu item is there but greyed out, click into a cell first. The command needs a selection to act on.

Daniel Shuttleworth
Written by

Daniel Shuttleworth

Editor · Sylvan Lake, Alberta

Daniel Shuttleworth studied Advanced Information Communication Technology and has spent more than 20 years working out why consumer tech misbehaves — from an Amiga 600 and a VHS deck through to whatever Xbox and Samsung shipped this year. He writes The Tech Cell from Sylvan Lake, Alberta, and checks every step against the vendor's current documentation before it goes out, because the menu that worked last spring has usually moved.

Filed under · Computers & devices← Back to all articles
How we work

Every step checked before it reaches you.

Menus move, settings get renamed and features quietly disappear. So each guide is written against the vendor's current documentation rather than from memory, and says plainly when a fix depends on your version.

3
Desks covered
0
Sponsored posts
$0
Cost to read
Every
Guide source-checked

One email when we publish a fix worth knowing.

No filler, and we do not pass your address to anyone.