Conditional formatting is one of Excel's most underused features. It automatically changes the appearance of cells based on their values — making patterns, outliers, and trends instantly visible without a single chart.
The Basics: Built-in Rules
Select your data range, then go to Home → Conditional Formatting. You'll find these categories:
Highlight Cell Rules
- Greater Than / Less Than — Highlight cells above or below a threshold
- Between — Highlight values within a range
- Equal To — Highlight specific values
- Text That Contains — Highlight cells containing specific text
- Duplicate Values — Instantly find duplicates in your data
Top/Bottom Rules
- Top 10 items or top 10%
- Bottom 10 items or bottom 10%
- Above or below average
Visual Formats
Data Bars
Turn any column of numbers into miniature bar charts directly inside cells. Select your range → Conditional Formatting → Data Bars. Choose gradient or solid fill. Great for comparing values at a glance without creating a separate chart.
Colour Scales
Apply a gradient of colours across your values — green for high, red for low (or reversed). Perfect for heat maps, performance dashboards, and highlighting distribution patterns.
Icon Sets
Add arrows, traffic lights, stars, or flags to cells based on value ranges. Useful for KPI dashboards — green arrow up for targets met, red arrow down for missed targets.
Custom Formula-Based Rules
This is where conditional formatting becomes truly powerful. Go to Conditional Formatting → New Rule → Use a formula.
Example 1: Highlight Entire Row Based on One Cell
To highlight the entire row if column D says "Overdue":
=$D1="Overdue"
The $D locks the column reference while letting the row number change — so the rule checks column D for every row.
Example 2: Alternating Row Colours
=MOD(ROW(),2)=0
This applies formatting to every even row, creating a zebra-stripe effect that improves readability.
Example 3: Highlight Weekends
If column A has dates:
=OR(WEEKDAY($A1)=1, WEEKDAY($A1)=7)
Example 4: Cells Older Than 30 Days
=TODAY()-$A1>30
Pro Tips
- Rule order matters — Rules are evaluated top to bottom. Use "Manage Rules" to reorder them and check "Stop If True" when needed.
- Use named ranges — Reference named ranges in formulas for clarity and maintainability.
- Performance — Too many conditional formatting rules on large datasets can slow down Excel. Use sparingly on 100K+ row sheets.
- Copy formatting — Use Format Painter (
Ctrl+Shift+C) to copy conditional formatting rules to other ranges. - Clear rules — To remove all formatting: Conditional Formatting → Clear Rules → Clear Rules from Entire Sheet.
Dashboard Use Case
Combine multiple conditional formatting types to create a visual dashboard:
- Data bars on revenue columns
- Traffic light icons on target achievement columns
- Color scale on a heatmap of monthly performance
- Red highlight on overdue items
All without writing a single formula or creating a chart. That's the power of conditional formatting.
Want to master Excel with AI?
My upcoming Complete Excel Guide with AI Integration course covers everything from formulas to AI-powered workflows.
Explore Courses