Change cell background color based on values in Google Sheets (Conditional Formatting)

Use Google Sheets' Conditional Formatting to color cells automatically so key numbers and text stand out—set discrete rules (greater than, less than, text contains) or a color scale heatmap to visualize patterns.

What the video covers

Google Sheets conditional formatting for numeric and text data

Watch the video on YouTube

Step-by-step instructions

  1. Open the spreadsheet
    In your web browser, open the Google Sheets file that contains the data you want to highlight.
  2. Select the target range
    Click and drag to highlight the cells you want formatted (for example B2:B100 or an entire column).
  3. Open Conditional Formatting
    From the top menu, open the Format menu and choose Conditional formatting to show the rules panel.
  4. Create a single-color rule
    On the Single color tab, pick a rule under 'Format cells if…' such as Greater than, Less than, or Text contains. Enter the comparison value or text, choose a fill color under Formatting style, then apply (Done) to enable the rule.
  5. Use a color scale for heatmaps (optional)
    Switch to the Color scale tab, choose or customize a gradient, and set minimum, midpoint, and maximum thresholds so cells render a continuous color range based on their numeric values.
  6. Manage multiple rules
    Add additional rules to highlight other thresholds or text matches. Reorder or remove rules in the panel if results conflict or don’t look right.

Watch the video

Video thumbnail for Change cell background color based on values in Google Sheets (Conditional Formatting) Play tutorial

Watch on YouTube

Why it matters

Coloring cells by value makes it fast to spot high/low numbers, status flags, and trends without scanning raw rows. Use rules for clear thresholds or a color scale for continuous heatmaps.

Check your result

Cells in the selected range update their background automatically when their contents meet your rule(s); a color gradient appears when using the Color scale option.

Troubleshooting

If colors do not appear, verify you selected the intended range and that the rule’s comparison value or text match is correct. Remove or reorder conflicting rules. For formula-based rules, confirm the formula returns TRUE/FALSE for the active cell.