Sub topic 3
Single color rules with built-in conditions
This chapter assumes you can open a spreadsheet, select a range such as A2:F100, and type values and simple formulas into cells. It covers the Single color tab of the conditional formatting sidebar: how a rule is built, what each built-in condition tests, and the mistakes that make a rule format the wrong cells or nothing at all.
What a single color rule is
A single color rule has three parts:
- A range the rule applies to.
- A condition that Google Sheets tests for each cell in that range.
- A formatting style that is applied to every cell where the condition is true.
The word "single" refers to the result. Each matching cell gets one fixed style, such as a red fill, with no gradient. A color scale, covered in the next chapter, shades cells on a gradient instead.
The condition is one of the built-in choices in the "Format cells if..." dropdown. Because you choose it from a list, you don't write a formula. The list also contains "Custom formula is", which later chapters cover. This chapter stays with the built-in conditions.
Creating a rule step by step
- Select the cells you want to format, for example B2:B100.
- Open Format, then Conditional formatting. A sidebar opens on the right.
- Confirm the Single color tab is selected.
- Check the Apply to range box. It is filled in from your selection, and you can edit it directly.
- Under Format cells if..., pick a condition.
- Type the value the condition needs, if it needs one.
- Under Formatting style, choose a fill color, text color, or text style.
- Click Done.
The sidebar previews the result as you work, and it only saves the rule when you click Done. If you close the sidebar before then, the rule is not kept.
The built-in conditions
The conditions fall into four groups. The wording can change slightly between versions of Sheets, but the groups are stable.
Empty and not empty
"Is empty" and "Is not empty" need no value. They are useful for finding gaps in a column that should be complete, or for marking rows that already have an entry.
A cell that contains a formula returning an empty string (="") looks blank but is not empty. "Is empty" will not format it. If you rely on this condition, check how the cells are produced.
Text conditions
| Condition | True when the cell text... |
|---|---|
| Text contains | includes your text anywhere |
| Text does not contain | does not include your text |
| Text starts with | begins with your text |
| Text ends with | ends with your text |
| Text is exactly | matches your text in full |
These comparisons ignore upper and lower case, so "done", "Done", and "DONE" all match "Done". Each condition accepts only one text value. To highlight both "Late" and "Overdue", create two rules with the same style, or use a custom formula.
"Text contains" is looser than it looks. A rule for "art" also formats "Party" and "Cart". Use "Text is exactly" when you need a whole-cell match.
A trailing space makes "Done " different from "Done". If "Text is exactly" misses cells that look right, stray spaces are a common cause. TRIM can clean the data.
Date conditions
| Condition | What it compares |
|---|---|
| Date is | the cell date against a chosen day |
| Date is before | dates earlier than a chosen day |
| Date is after | dates later than a chosen day |
For each one you pick the comparison day from a second dropdown: today, tomorrow, yesterday, in the past week, in the past month, in the past year, or an exact date. The relative options are re-evaluated whenever the sheet recalculates. A rule set to "Date is before today" starts formatting a date the day after it occurs, with no action from you.
These conditions work only on real dates. If you typed a date and Sheets left it left-aligned, it was probably stored as text. Reformat it or re-enter it in a recognized date format before relying on the rule.
Number conditions
| Condition | Typical use |
|---|---|
| Greater than | scores above a target |
| Greater than or equal to | quantities at or over a threshold |
| Less than | stock below a minimum |
| Less than or equal to | budgets at or under a limit |
| Is equal to | an exact number |
| Is not equal to | anything except one value |
| Is between | values inside a range, ends included |
| Is not between | values outside a range |
"Is between" asks for two values. It includes both endpoints, so a rule for 10 and 20 formats a cell holding 10 and a cell holding 20.
"Is equal to" and "Is not equal to" also work on text. "Is not equal to" formats every cell in the range that doesn't match, so it also catches blank cells and header cells that fall inside the range.
Number conditions need real numbers. A value stored as text, such as '42 or a number pasted from a web page, is not compared numerically. If a "Greater than" rule ignores a cell that obviously qualifies, check whether the cell is left-aligned.
Using a cell instead of a typed value
The value box accepts a cell reference as well as a typed value. Type = followed by the reference, as in =$G$1. The rule then compares each cell in the range against whatever is in G1.
This lets you change a threshold without editing the rule. Put a target in G1, build a "Greater than" rule that points at it, and update G1 whenever the target changes.
Use an absolute reference ($G$1) here. Without the dollar signs, the reference is relative and shifts for each cell the rule evaluates, so the second row would compare against G2 and the third against G3. The next-but-one chapter on references explains why. For now, anchor the threshold cell with $ on both the column and the row.
A reference to a cell on another sheet is not accepted directly in this box. The chapter on INDIRECT covers how to work around that.
Formatting styles
The formatting style section offers:
- Bold, italic, underline, and strikethrough.
- Text color.
- Fill color.
- A set of default preset styles you can click.
You can combine several of these in one rule. A rule can set a red fill, white text, and bold at the same time. Strikethrough works well for completed tasks, because the cell content stays readable but visibly retired.
Choose styles that stay legible. A dark fill with the default black text is hard to read, so set the text color in the same rule. Also avoid relying on red versus green alone, because many people can't distinguish them. Pair color with a text style, such as bold, so the signal survives for a reader who sees the colors the same.
Several conditions on the same range
You can add more than one rule to the same range using Add another rule in the sidebar. For example, a Status column might have one rule for "Text is exactly Done" with a green fill, one for "Text is exactly Blocked" with a red fill, and one for "Is empty" with a gray fill.
Each cell gets formatted by the first rule in the list that matches it. When two rules overlap, the one nearer the top decides the result, and the lower one is ignored for that cell. The chapter on rule order explains this in detail, and you can reorder rules by dragging them. When your rules test mutually exclusive values, as in the Status example, order doesn't matter.
A worked example
Suppose a sheet tracks tasks:
| Row | A | B | C |
|---|---|---|---|
| 1 | Task | Due | Status |
| 2 | Draft report | 2026-12-01 | In progress |
| 3 | Send invoice | 2026-11-20 | Done |
| 4 | Book venue | 2026-11-25 | Blocked |
You want three things: completed statuses in green, blocked statuses in red, and past due dates in bold red text.
First, select C2:C100 and create a rule with "Text is exactly" and the value Done, with a green fill. Click Add another rule, choose "Text is exactly" with Blocked, and set a red fill. Click Done when finished.
Next, select B2:B100 and create a rule with "Date is before" and "today", with bold red text.
Rows 2 to 100 are covered, so new tasks added below row 4 pick up the formatting automatically. The date rule marks "2026-11-20" and "2026-11-25" as past due once today is after those dates. It leaves row 2 alone until 2026-12-01 has passed.
This example formats the status cell and the date cell separately. If you want the whole row to change color based on one cell, a built-in condition can't do it, because built-in conditions only test the cell they format. That requires a custom formula, such as this one applied to A2:C100:
=$C2="Done"The custom formula chapter develops this.
Common mistakes
- The range is wrong. The sidebar shows the range it will use. If you selected A2:A20 and later add data in row 50, nothing formats there. Widen the range, or start with a generous end row.
- The range includes the header row. A rule such as "Is not equal to 0" formats the header text too. Start the range at the first data row.
- A threshold is typed with units or separators. Typing
$1,000or10 kgin a number condition can fail. Use plain numbers and format the cells separately. - Text compared where numbers are expected. A column filled with numbers stored as text gives no match for number conditions. Convert them to numbers.
- Relative references in the value box.
=G1instead of=$G$1shifts down the range, as described above. - Overlapping rules. A broad rule above a narrow one can hide the narrow one. Reorder or tighten the conditions.
Summary of when to use a built-in condition
Use a built-in condition when you are testing one cell against a fixed value, a date, or a threshold in another cell, and you want that same cell formatted. Switch to a custom formula when the format must depend on a different cell, on a calculation, or on more than one test. Switch to a color scale when you want a gradient rather than a yes-or-no result.
Exercise
A column of stock counts is in D2:D200. You want any count below 5 shown in red fill. A threshold of 5 sits in cell G1 and may change. Which condition and value would you use, and why should the value be written the way you chose?
Show answer
Select D2:D200, open Format > Conditional formatting, and choose "Less than" on the Single color tab. Enter the value as =$G$1 and pick a red fill. The dollar signs keep the reference fixed on G1 for every cell in the range. Without them the reference would shift down to G2, G3, and so on, and the rule would compare against empty cells. Pointing at G1 means you can change the threshold there without editing the rule.
Exercise
A Notes column in E2:E300 should highlight any cell that contains the word "urgent", whatever its capitalization. Another rule on the same range uses "Is not empty" with a gray fill and sits above the first rule. Cells containing "URGENT: call client" stay gray. What is happening, and how do you fix it?
Show answer
The rules overlap, and the first rule in the list that matches a cell decides its format. "URGENT: call client" is not empty, so the gray rule above wins and the "Text contains urgent" rule is never used for that cell. Text conditions ignore case, so the urgent rule itself is correct. Drag the "Text contains urgent" rule above the gray "Is not empty" rule so it is checked first. Blank notes stay unformatted, non-urgent notes stay gray, and urgent notes take the urgent style.