How To Use Conditional Formatting In Google Sheets (2026)
Conditional formatting in Google Sheets changes how a cell looks when its value meets a rule you set.
You can color cells by a simple condition, shade a range with a color scale, or write a custom formula.
These steps follow Google’s help pages for Sheets on a computer and in the Android app.
Quick answer: add a conditional formatting rule
| Step | What to do |
|---|---|
| 1 | Open the spreadsheet in Google Sheets on your computer. |
| 2 | Select the cells, rows or columns to format. |
| 3 | Click Format, then Conditional formatting. A toolbar opens on the right. |
| 4 | Create a single color rule, a color scale, or a custom formula rule. |
| 5 | Click Done. |
Single color rules
Use a single color rule when a cell should change appearance only if a condition is true.
- Under Format cells if, choose the condition that triggers the rule.
- Under Formatting style, choose how the cell looks when the condition is met.
- Click Done.
The Fill option sets the background color, and other formatting properties can be chosen before you click Done.
Example: highlight scores below 80%
- Select the scores.
- Click Format, then Conditional formatting.
- Under Format cells if, click Less than.
- Click Value or formula and enter
0.8. - Click Fill and choose red.
- Click Done.
Color scale rules
A color scale shades each cell along a gradient based on its value.
- Under Preview, select a color scale.
- Choose a minimum and maximum value, plus an optional midpoint value.
- To set the value category, click the down arrow next to it.
In the Android app, Google says that if you leave the minimum, maximum and midpoint blank, Sheets adjusts them automatically.
Custom formula rules
- Under the Format cells if drop-down menu, click Custom formula is.
- Click Value or formula and enter the formula.
- Choose the formatting, then click Done.
Add dollar signs before column letters and row numbers when the formula should use absolute references, such as $A$1:$A$100, instead of relative ones.
Formula examples from Google
| Goal | Custom formula |
|---|---|
| Highlight duplicates in A1:A100 | =COUNTIF($A$1:$A$100,A1)>1 |
| Color a whole row green when column B says Yes (columns A:E selected) | =$B1="Yes" |
For duplicates, you can also remove them outright with the Remove duplicates tool in Google Sheets.
Which rule type to use
| Rule type | Set it up under | Good for |
|---|---|---|
| Single color | Format cells if, then Formatting style | Flagging cells that meet a condition such as Less than or Text contains. |
| Color scale | Preview, then minimum, maximum and optional midpoint | Shading a range by value from low to high. |
| Custom formula | Format cells if, then Custom formula is | Duplicates, whole-row highlights and anything a built-in condition cannot test. |
All three are created in the same toolbar, so you can mix them on one sheet.
Wildcards in text rules
Wildcards work with the Text contains and Text does not contain conditions.
| Character | Meaning | Example |
|---|---|---|
| ? | Matches any single character. | a?c matches abc but not ac or abbc. |
| * | Matches zero or more characters. | a*c matches abc, ac and abbc but not ab or ca. |
| ~ | Escapes a wildcard so it matches literally. | a~?c matches a?c only. |
Edit, add and remove rules
To edit an existing rule, select the cells, open the Conditional formatting toolbar and click the rule.
To add another, click Add new rule and choose the condition.
To remove a rule, point to it and click Remove.
Rule order matters
Google says rules are evaluated in the order listed, and the first true rule defines the cell’s format.
To reorder rules, click and drag them in the toolbar.
If a cell ignores a rule you just added, check whether a rule above it already applies.
Rules that refer to another sheet
Formulas can only reference the same sheet in the notation ='sheetname'!cell.
To reference another sheet, Google says to use the INDIRECT function.
If a rule does not work as expected
| Problem | What to check |
|---|---|
| The wrong cells change color | Check the dollar signs in your formula, because relative references shift from cell to cell while absolute ones stay fixed. |
| A cell ignores your new rule | Look at the order in the toolbar, because the first true rule defines the format. |
| A rule refers to another sheet | Wrap the reference in the INDIRECT function. |
| Text contains finds the wrong cells | Check for ?, * or ~ in your text, because they are treated as wildcards. |
| Create a filter is unavailable | Open Format, then Conditional formatting, and look for rules, because Google lists them as one cause. |
| Rules appeared after pasting | Pasting copied cells also pastes the rules attached to them. |
Google also says you can filter and sort by conditional formatting colors, but not by alternating colors.
Copying cells copies their rules
When you copy and paste cells that have conditional formatting, the rules are pasted as well.
That can leave extra rules on a sheet, so open the toolbar to review them.
Conditional formatting on Android and iPhone
| Device | What you can do |
|---|---|
| Android app | Tap the Format icon, then Conditional formatting. Tap Add, set conditions, then tap Done. |
| Android rule list | Choose Selected range for rules touching your selection, or All for every rule on the sheet. |
| Android reorder | Tap Move and drag a rule. |
| iPhone and iPad | Google says you can see rules but not edit them. |
See every rule on a sheet in the Android app
Open Conditional formatting in the app and choose Selected range or All.
Selected range lists the rules that touch your selection, while All lists every rule on the sheet.
Tap Done to return to the sheet.
To delete a rule in the app, tap Remove, then Done.
To change a rule, open Conditional formatting, tap the existing rule, make the change and tap Done.
Related guides and sources
Excel users can read how to use conditional formatting in Excel.
Once your cells are color coded, you can sort and filter by those colors in Google Sheets.
To keep typed values consistent, see how to create a drop-down list in Google Sheets.
The source for every step is Google’s Use conditional formatting rules in Google Sheets help page.