
Conditional formatting turns a static grid of numbers into one that points at what matters — over-budget cells in red, top performers highlighted, duplicates flagged, deadlines coloring as they approach. In Excel it lives on the Home tab, and it splits cleanly into two halves: a menu of built-in rules that handle the common cases in a few clicks, and a custom-formula option that handles everything else. This walks through both, plus the rule-management details that decide which formatting actually shows when several rules overlap.
The built-in rules cover most cases
Home → Conditional Formatting opens a menu whose top entries handle the everyday jobs without any formula. Select your range first, then pick a rule.
| Rule | Highlights |
|---|---|
| Greater Than / Less Than | Values above or below a number you set |
| Between | Values inside a range |
| Text That Contains | Cells holding a given word |
| Duplicate Values | Entries that appear more than once |
| Top 10 / Above Average | The standouts in a column |
Each opens a small dialog where you set the threshold and pick a format. “Highlight Cells Rules” covers comparisons and text; “Top/Bottom Rules” covers rankings and averages. Between them, they answer most quick questions — which orders are over $1,000, which entries are duplicated, which scores beat the average — in two clicks and no typing. Microsoft’s conditional formatting guide documents every built-in rule type.
Data bars, color scales, and icon sets
The next section of the menu visualizes values rather than just flagging them — turning a column of numbers into an at-a-glance picture.
- ✓ Data bars fill each cell proportionally — an in-cell bar chart for a column of numbers
- ✓ Color scales shade cells on a gradient — a heatmap showing high and low at a glance
- ✓ Icon sets add arrows, traffic lights, or ratings based on value thresholds
These shine on dense data where reading every number is slow. Data bars in a sales column instantly show which products lead; a red-white-green color scale across a grid reveals concentrations no table of figures would. Use them where magnitude matters and you want the eye to compare without doing arithmetic — and keep the thresholds sensible, since an icon set with badly-set cutoffs misleads as easily as it informs. One refinement worth knowing: data bars handle negative values too, splitting at a midpoint axis so losses extend left and gains right — useful for profit-and-loss columns. And you can show the bar without the number (in the data-bar settings) when the visual alone tells the story, which keeps a dashboard cleaner.
Custom formula rules: the escape hatch
When the built-in rules don’t fit, “New Rule → Use a formula to determine which cells to format” accepts any formula that returns TRUE or FALSE. This is where conditional formatting becomes truly flexible.
=COUNTIF($A$2:$A$100, A2)>1 'flag duplicates
=AND($C2<TODAY(), $E2<>"Done") 'overdue and not finished
=ISBLANK($D2) 'highlight missing entries
The rule evaluates the formula for every cell in the applied range; where it’s TRUE, the format applies. This unlocks logic the menu can’t express — formatting based on another column, a date calculation, or a count. If you can phrase the condition as a formula, you can format on it, which makes custom rules the workhorse behind any dashboard-grade sheet. The deeper patterns — and the dollar-sign behavior that makes them work — are covered in the guide to advanced custom-formula rules (written for Sheets, but the logic is identical in Excel).
Highlight a whole row
The most-asked custom rule colors an entire row based on one cell — a red row for every overdue task, not just a red date. The trick is the dollar sign.
=$E2="Overdue"
Apply this to the whole data range (say A2:F100, not just column E), and lock the column with $E while leaving the row relative. Now every cell checks its own row’s column E, so the whole row colors when E reads “Overdue.” That single asymmetry — column locked with $, row floating — is the foundation of whole-row formatting, and getting it backwards is why formatting so often lands on the wrong cells. It’s the same technique that drives a color-coded task tracker.
Manage rules: order and scope
When several rules apply to the same cells, Excel’s Manage Rules dialog (Conditional Formatting → Manage Rules) controls what wins.
Rules run top to bottom, and order matters: put the most specific rule first, because a broad rule above a sharp one can fire first and mask it. The “Stop If True” checkbox halts further rules for a cell once one matches — useful for layering. And the “Applies To” box shows each rule’s range, which is where you fix a rule that’s coloring too much or too little. When a color you expect doesn’t appear, check this dialog before rewriting the formula: the problem is far more often rule order or scope than the rule itself.
A few recipes to start from
The fastest way to learn conditional formatting is to copy a working rule and adapt it. Here are the ones people reach for most:
| Goal | Rule |
|---|---|
| Flag overdue, unfinished tasks | Custom: =AND($C2<TODAY(), $D2<>"Done") |
| Heatmap a column of numbers | Color scale on the spend or score column |
| Spot duplicate IDs or emails | Highlight Cells → Duplicate Values |
| Mark the top five performers | Top/Bottom Rules → Top 10, set to 5 |
| Show progress visually | Data bars on a % complete column |
Each of these takes under a minute once you know which menu to open — the first two custom, the rest built-in. Build one, see it work on real data, and adapt the threshold or formula to your own sheet. Most practical conditional formatting is a small variation on this handful, so getting comfortable with these five covers the large majority of what you’ll ever need it for.
Keep it useful, not a rainbow
Conditional formatting earns its place when it answers a question at a glance — what’s over budget, what’s overdue, what’s duplicated — and loses its value the moment everything is colored. Start with the built-in rules for the common cases, drop to a custom formula when you need logic the menu can’t reach, lock the column reference for whole-row highlights, and manage the order when rules overlap. The same toolkit exists in Google Sheets if your data lives there. Used with restraint, it quietly turns a passive spreadsheet into one that flags what needs your attention every time you open it.
