Conditional Formatting in Google Sheets: Color Cells by Their Value

Quick answer

Select the cells, then click Format > Conditional formatting. In the panel on the right, choose Single color to apply one style to cells that meet a condition, or Color scale to shade cells from low to high, set the condition or the minimum and maximum, pick the formatting, and click Done. To remove a rule later, point to it in the same panel and click Remove.

Conditional formatting changes the text or background color of a cell when that cell meets a condition you set: a score below a target, a status that says Yes, a date, or whatever a formula returns. The color updates on its own every time the data changes, so you write the rule once and the sheet keeps flagging the cells that matter.

Google Sheets gives you two kinds of rules, and they solve different problems. A Single color rule paints every matching cell the same way, which is what you want for pass or fail checks. A Color scale shades each cell along a gradient based on where its value sits between the lowest and highest number in the range, which is better for spotting trends in a column of figures. This guide covers both rule types, a custom formula example from Google's documentation, what happens when two rules overlap, and how to clear a rule.

Single color vs color scale: which rule fits your data

Single color Color scale
What it does Applies one text or fill style to every cell that meets the condition Shades each cell along a gradient according to its value relative to the rest of the range
Best for Yes or no checks: scores under 80%, cells that contain a word, duplicates, empty cells Ranking at a glance: sales by month, temperatures, any column of numbers
What you set A condition under "Format cells if" plus a formatting style A minimum, a maximum and an optional midpoint, each with a value category
Custom formula Yes, choose "Custom formula is" as the condition No
Where it lives Format > Conditional formatting, Single color tab Format > Conditional formatting, Color scale tab
Mobile Create and edit in the Android app; view only on iPhone and iPad Same as single color

Single color: highlight every score below 80%

Desktop (web)

  1. Select the cells the rule should watch

    Step 1: Select the cells the rule should watch (Select the range)

    Open your spreadsheet and drag across the cells you want to format, for example the column of test scores. To include rows you add later, click the column letter instead so the whole column is selected.

  2. Open the conditional formatting panel

    Step 2: Open the conditional formatting panel (Format > Conditional formatting)

    Click Format, then Conditional formatting. A panel opens on the right side of the screen. If the selected cells already have rules, they are listed here: click a rule to edit it, or click Add new rule to create a separate one.

  3. Choose the condition

    Step 3: Choose the condition (Format cells if > Less than)

    Make sure the Single color tab is active at the top of the panel. Under Format cells if, open the drop-down and click Less than. The same list holds text conditions such as Text contains and Text does not contain, date conditions, and Custom formula is for anything the presets cannot express.

  4. Enter the value to compare against

    Step 4: Enter the value to compare against (Value or formula)

    Click Value or formula and type the threshold. Scores formatted as percentages are stored as decimals, so type 0.8 to catch everything under 80%. Typing 80 would compare against eight thousand percent and nothing would light up.

  5. Pick how matching cells should look

    Step 5: Pick how matching cells should look (Formatting style > Fill)

    Under Formatting style, click Fill (the paint bucket) and pick a red. You can also change the text color or make the text bold. The preview swatch above the controls shows the combination before you commit to it.

  6. Save the rule

    Step 6: Save the rule (Done)

    Click Done. Every score under 80% turns red right away, and any value you edit or add inside the range is checked against the rule from then on.

Color scale: shade a column from lowest to highest

Desktop (web)

  1. Select the numbers only

    Step 1: Select the numbers only (Select the range)

    Highlight the cells that hold the figures you want to compare, for example monthly sales in C2:C13. Leave the header out, since a color scale works on numbers.

  2. Open the rules panel

    Step 2: Open the rules panel (Format > Conditional formatting)

    Click Format, then Conditional formatting. If a single color rule already covers these cells, click Add new rule so you do not overwrite it.

  3. Switch to the Color scale tab

    Step 3: Switch to the Color scale tab (Color scale)

    At the top of the panel, click Color scale. The Preview bar shows the gradient that is currently selected, with the color for the lowest value on the left and the highest on the right.

  4. Choose a gradient

    Step 4: Choose a gradient (Preview > pick a scale)

    Under Preview, click the gradient bar and choose one of the preset scales, for example white to green. A light-to-dark preset is easier to read than two strong colors, especially when the sheet is printed.

  5. Set the minimum, maximum and midpoint

    Step 5: Set the minimum, maximum and midpoint (Min / Mid / Max value)

    By default the lowest number in the range gets the start color and the highest gets the end color. To pin a boundary to a fixed figure instead, click the Down arrow next to the minimum or maximum, choose the value category, and type the number. The midpoint is optional: set it when you want a third color in the middle, for example white at your monthly target.

  6. Apply the scale

    Step 6: Apply the scale (Done)

    Click Done. Each cell is shaded according to where it sits between the minimum and maximum, and the shades shift whenever a number changes. Because the scale follows the data, a new record high nudges every other cell toward the low-end color.

Custom formulas, rule order and clearing rules

When the preset conditions are not enough, choose Custom formula is under Format cells if and type a formula in Value or formula. Write it as if it applied to the first cell of your selection, starting with an equals sign; Sheets then shifts the relative references for every other cell and formats the ones where the formula returns TRUE. Google's own example for flagging duplicates in A1:A100 is =COUNTIF($A$1:$A$100,A1)>1. The dollar signs lock the range being counted while the bare A1 moves down row by row. To color an entire row based on one column, select the whole block, say columns A:E, and use =$B1="Yes": the dollar sign in front of B keeps every column looking at column B, and the row number stays relative so each row judges itself. Formulas can only reference the current sheet; to pull a value from another sheet, wrap the reference in the INDIRECT function.

Text conditions accept wildcards. With Text contains or Text does not contain, a question mark stands for any single character, an asterisk for zero or more characters, and a tilde in front of either one makes it literal, so a*c matches ac, abc and abbc.

Rules are evaluated in the order they appear in the panel, and the first rule that is true for a cell decides its format. If you want scores under 50 in red and scores under 80 in yellow, the under-50 rule has to sit first; otherwise every low score satisfies the under-80 rule and turns yellow. To reorder, point to a rule, grab it, and drag it up or down the list.

To clear a rule, open Format, then Conditional formatting, point to the rule and click Remove (the trash icon). The cells keep any ordinary formatting you applied by hand; only the conditional colors disappear. In the Android app, tap Format, then Conditional formatting, and at the top choose Selected range or All to review every rule on the sheet. Google's conditional formatting help page documents the Android steps in full; on iPhone and iPad you can view existing rules but not create or edit them.

Common questions about conditional formatting rules

Why does my rule color nothing, or color the wrong cells?

Three causes account for most cases. The value is in the wrong unit, such as 80 instead of 0.8 for a percentage. A custom formula was written for a cell other than the top-left cell of the selected range, so the relative references point one row or column off. Or an earlier rule in the list is already true for those cells and wins. Check the order first; it is the one people forget.

Can a rule look at a cell on another sheet?

Not directly. Conditional formatting formulas can only reference the sheet they are on, so a formula like =Sheet2!A1>5 is rejected. Wrap the reference in INDIRECT instead, for example =INDIRECT("Sheet2!A1")>5, and the rule works.

Does conditional formatting work in the Google Sheets mobile app?

On Android you can create, edit and remove rules: tap Format, then Conditional formatting, and the same Single color and Color scale options appear. On iPhone and iPad the app shows existing rules but does not let you change them, so build or fix rules on a computer or an Android device.

Checked against

Steps verified on November 25, 2026 using these official pages:

Spotted something that changed in the app? Tell us and we will re-check the guide.