How to Color Cells Based on Value in Google Sheets

By Gerard Fernandez · Updated · 2 min read

Conditional formatting colors cells automatically based on what's in them: red for negative numbers, green for "Done", a heatmap for a column of scores. The colors update the moment the data changes, so your sheet always highlights what matters.

Color cells with a single-color rule

  1. Select the cells to format, for example a column of amounts.
  2. Go to Format → Conditional formatting. A panel opens on the right.
  3. Under Format cells if…, pick a condition such as Greater than, Text is exactly or Is between, and type the value.
  4. Choose a fill color under Formatting style.
  5. Click Done.
Conditional formatting panel in Google Sheets with a greater than 50 rule coloring scores over 50 green
Scores greater than 50 turn green. Add more rules for other bands.

Common conditions

Format cells if…Use it for
Greater than / Less thanLarge or small numbers (budgets, scores)
Text is exactlyStatus words like "Done" or "Overdue"
Text containsAny cell mentioning a keyword
Date is beforeOverdue deadlines
Is empty / Is not emptyMissing or filled-in data

Make a heatmap with a color scale

For a column of numbers, a color scale shades each cell by how big it is:

  1. Select the numbers and open Format → Conditional formatting.
  2. Click the Color scale tab at the top of the panel.
  3. Pick a preset, or set the min, midpoint and max colors yourself.

Color a whole row based on one cell

To color the entire row when a status column says "Overdue", select the whole table and use a custom formula. With the status in column D:

=$D2="Overdue"

The dollar sign before D locks the column, so every cell in the row checks column D. This is the same technique used to highlight duplicates.

Edit or remove a rule

Select the range, open Format → Conditional formatting, and the existing rules appear. Click one to edit it, or hover and click the trash icon to delete it. Rules are checked top to bottom, and the first one that matches wins, so drag them to reorder if two overlap.

Frequently asked questions

Why isn't my rule working?

Check the Apply to range box at the top of the rule, and make sure numbers are stored as numbers, not text. A rule set for "greater than 50" won't fire on the text "60".

Can I copy conditional formatting to other cells?

Yes. Copy a formatted cell, select the target cells, and use Edit → Paste special → Conditional formatting only.

How many rules can one range have?

As many as you like. They stack, and the first matching rule decides the color.