📊 Lesson 5.3: Conditional Formatting
Wouldn't it be nice if overdue tasks turned red by themselves, or the biggest numbers glowed automatically? That's conditional formatting: rules that change a cell's look based on its value. It's the finishing touch that turns a static grid into a living tracker where problems and highlights jump out on their own.
📚 What You'll Learn
By the end of this lesson, you will be able to:
- Create single-color rules (greater than, text contains, date is, is empty)
- Apply color scales to make a heatmap of your numbers
- Write custom-formula rules that highlight an entire row
- Manage rule order and ranges, and copy formatting
- Understand the performance cost of too many rules
⏱️ Estimated Time: 45 minutes
🎯 Project: Add conditional formatting to a tracker — a color scale, an overdue-date highlight, an over-budget whole-row rule, and a done-row style.
In This Lesson
The Idea — Formatting That Reacts
Ordinary formatting (bold, a color, a border) stays put no matter what the cell says. Conditional formatting is different: it applies a look only when a condition is true. Set a rule like "if this cell is below zero, make it red," and every negative number turns red — now and forever, including new data you add later.
Why it matters: it moves the work of noticing from you to the sheet. Instead of scanning a hundred rows for the overdue ones, you let red do it. Instead of hunting for the biggest values, a color scale paints them for you. On a shared tracker, this is what lets a teammate open the sheet and instantly see what needs attention.
🧠 Mindset
Think of conditional formatting as hiring the sheet to watch your data for you. You describe once what "a problem" looks like — overdue, over budget, out of stock — and the sheet flags it every time, tirelessly. Used with restraint, it's the difference between data you have to read and data that reads itself to you.
Single-Color Rules
Select a range, then Format → Conditional formatting. The default "Single color" tab offers a "Format cells if…" dropdown with common conditions:
| Condition | Example use |
|---|---|
| Greater than / Less than / Between | Flag amounts over a threshold |
| Text contains / is exactly | Highlight rows whose Status is "Overdue" |
| Date is before / after / is | Flag dates in the past or this week |
| Is empty / is not empty | Show cells someone forgot to fill in |
Pick a condition, choose a formatting style (fill color, text color, bold), and click Done. The style applies to every cell in the range that meets the condition, and updates the instant a value changes. You can layer several single-color rules on the same range.
✅ Pro Tip
For "date is before today," use the built-in relative option or the value =TODAY() — the
highlight then rolls forward automatically each day. That's how an "overdue" flag stays correct without
you ever touching it.
Color Scales (Heatmaps)
Switch to the Color scale tab and Sheets colors a range along a gradient from its lowest to highest value — a heatmap. Big values might be dark green, small ones white, giving you an instant sense of where the highs and lows are without reading a single number.
You control the min, midpoint, and max points and their colors. Color scales are perfect for a matrix of numbers — monthly sales by region, scores by student, activity by day — where you care about the pattern more than exact figures.
💡 Scale vs single color
Use a single-color rule when there's a clear pass/fail line ("over 100 is a problem"). Use a color scale when you want to see relative magnitude across a whole range with no hard cutoff. They answer different questions — pick to match yours.
Custom-Formula Rules
This is the powerful tier. Choose "Custom formula is" and you can write any logical formula; the cell
gets formatted wherever the formula is TRUE. The killer application is highlighting an
entire row based on one column's value.
Say your data is in A2:E100 and column D holds a Status. To shade the whole row red when Status is "Overdue", select A2:E100, choose "Custom formula is", and enter:
=$D2="Overdue"
The magic is in the dollar signs. Locking the column with $D means "always
look at column D," while leaving the row unlocked (just 2) means "check each row's own
D." So row 2 checks D2, row 3 checks D3, and so on — and the whole matching row lights up. This is the exact
relative-vs-absolute idea from Lesson 2.1, now doing real work.
Other handy custom rules:
Over budget row: =$C2 > $E2 (actual over budget)
Done row, grayed: =$F2=TRUE (a checkbox column)
Weekend dates: =WEEKDAY($A2,2) > 5
Duplicate values: =COUNTIF($B:$B, $B2) > 1
⚠️ Important Note: The reference in a custom-formula rule is relative to the top-left cell of the range you selected. If your data starts in row 2, write$D2(not$D1or$D3). Getting this row number right is the one fiddly part — always base it on the first row of your applied range.
Managing Rules & Performance
Open Format → Conditional formatting to see all rules for the current selection. A few things to know:
- Order matters. Rules are checked top to bottom, and the first matching rule that sets a given property wins. Drag rules to reorder if two compete.
- Ranges. Each rule applies to a specific range; you can widen it (e.g. to a whole column) so new rows are covered automatically.
- Copy formatting. Use Paste special → Conditional formatting only, or the paint-format tool, to reuse rules elsewhere.
- Remove or edit a rule from the same panel — click it to adjust, or the trash icon to delete.
⚠️ Watch Out
Conditional formatting is a common cause of a slow spreadsheet, especially many rules over
huge ranges or heavy COUNTIF-style custom formulas across whole columns. Apply rules to the
range you actually use rather than entire million-row columns, and prune rules you no longer need. We
dig into keeping big sheets fast in Lesson 8.2.
🎯 Project: A Living Tracker
You'll take a tracker (your task or budget data) and make it flag its own problems. This is the polish that makes the projects in Module 7 genuinely useful.
🏋️ Make it react
Objective: Add four conditional-formatting rules that surface what matters.
Instructions (about 15 minutes):
- (3 min) On a numeric column (amounts or scores), add a color scale so highs and lows are visible at a glance.
- (3 min) On a date column, add a single-color rule: date is before today → red text, to flag overdue items.
- (4 min) Select the whole data range and add a custom formula whole-row rule, e.g.
=$D2="Overdue"or=$C2>$E2(over budget) → light red fill. - (3 min) Add a checkbox "Done" column (select the cells, then Insert → Checkbox) and a custom rule
=$F2=TRUEthat grays out and strikes through completed rows. - (2 min) Open the rules panel, check the order, and tidy the ranges so they cover only your data.
💡 Hint — the whole-row trick
Select the full data range (e.g. A2:F100), then:
Custom formula: =$D2="Overdue" (lock the column, not the row)
Because $D2 is column-locked and row-relative, each row
checks its own column D, so the entire matching row formats.
Base the row number (2) on the FIRST row of your selection.
✅ Project Completion Checklist
- A color scale shows magnitude on a numeric column
- An overdue rule flags past dates automatically
- A custom-formula rule highlights a whole row based on one column
- A checkbox rule grays out completed rows
- Rule order and ranges are tidy
🎯 Quick Quiz
Question 1: In a custom-formula rule to highlight a whole row when column D says "Overdue", why do you write =$D2 and not =$D$2?
Question 2: When is a color scale a better choice than a single-color rule?
Best Practices for Conditional Formatting
✅ Do's
- Use it to surface what matters — overdue, over budget, out of stock.
- Lock the column, not the row for whole-row rules, based on your range's first row.
- Apply rules to the used range, not entire million-row columns.
❌ Don'ts
- Don't over-color. If everything is highlighted, nothing stands out.
- Don't rely on color alone — pair it with an icon or label for accessibility.
- Don't pile on heavy rules over huge ranges; it slows the sheet.
💡 Pro Tips
- An overdue rule using
=TODAY()stays correct forever with no maintenance. - Combine a "Done" checkbox with a gray-out rule for a satisfying, self-updating task list.
📓 Learning Journal
Keep a learning journal as you work through this course — a document, a note, or a tab in your own spreadsheet. After each lesson, take a few minutes to write down:
- Key concepts you learned
- Techniques that clicked for you
- Questions or confusion points to revisit
- Ideas you want to try in your own sheets
- Your progress and feelings about learning this
✍️ This lesson's prompt: Which of your sheets would benefit most from a rule that flags problems automatically? Describe the rule in plain words ("turn the row red when …") and then try writing it as a custom formula.
📝 Lesson Summary
🎓 Key Takeaways
- Conditional formatting applies a look only when a condition is true, and updates automatically.
- Single-color rules handle thresholds, text, dates, and blanks; color scales make heatmaps of magnitude.
- Custom-formula rules unlock whole-row highlighting — lock the column (
$D2), leave the row relative. - Mind rule order, ranges, and performance; don't over-color, and don't rely on color alone.
🎉 What You've Accomplished
That's Module 5 complete. You can now summarize with pivot tables, visualize with charts and sparklines, and make cells flag themselves with conditional formatting. Your data doesn't just sit there anymore — it highlights, charts, and summarizes itself. You're ready to share it with the world.
❓ Common Questions at This Stage
My whole-row rule only colors one column — why?
The rule's range is probably just that one column. Select the full data range (all the columns you want colored) before adding the custom-formula rule.
Two rules conflict — which wins?
The first matching rule (top of the list) wins for the property it sets. Drag rules to reorder them in the conditional formatting panel.
Can conditional formatting change a cell's value?
No — it only changes appearance (colors, bold, strikethrough). The underlying value is untouched, which is exactly why it's safe to use everywhere.
🔭 Looking Ahead
Next — Lesson 6.1: Sharing, Comments & Real-Time Collaboration — we begin Module 6. You'll learn the thing Sheets does better than almost anything: sharing a live sheet with others, editing together in real time, and discussing right in the cells — safely.
✅ Before the Next Lesson
- Keep your living tracker — you'll share it next lesson
- Try an overdue rule based on
=TODAY()so it self-updates - Write your Learning Journal entry for this lesson
📚 Additional Resources
🌟 Encouragement for the Journey
Your sheets now watch themselves — flagging what's overdue, over budget, or worth a look. That's the kind of polish people notice. Analysis and visualization: mastered. Time to share your work. 📊