
Complete Guide to Excel Conditional Formatting: Formula Rules, Icon Sets, Data Bars, and Management Tips
Reports are easier to understand when patterns stand out before the numbers. Excel conditional formatting automatically applies colors, icons, data bars, and more based on values or formula results to improve readability. This guide covers practical examples you can use right away, from creating, managing, and copying rules to performance optimization and formula-based rules.
Quick Fix (3 Steps)
- Select the range.
- Go to Home → Conditional Formatting (Alt → H → L) and select a rule.
- Set the options, then click OK.
Conditional Formatting Basics
- Rules / Applies To / Stop If True
- Rule types: Highlight Cells, Top/Bottom, Data Bars, Color Scales, Icon Sets, and Use a Formula
Gallery Rules
- Highlight duplicate or unique values
- Top, bottom, and average-based rules
- Data bars, color scales, and icon sets
Edit absolute thresholds in Manage Rules and set them as numbers, percentages, or formulas.
7 Formula Rule Examples
- Below target:
=B4<$A4 - Weekend shading:
=WEEKDAY($D4,2)>=6 - Due within 7 days:
=AND($E4>=TODAY(),$E4<=TODAY()+7) - Outliers (±2σ):
=OR(B4>AVERAGE($B$4:$F$100)+2*STDEV.P($B$4:$F$100), B4<AVERAGE($B$4:$F$100)-2*STDEV.P($B$4:$F$100)) - Alternating row shading:
=MOD(ROW(),2)=0 - Contains the text “Delayed”:
=ISNUMBER(SEARCH("Delayed",$C4)) - Highlight the first row of each group:
=A4<>A3
Managing, Prioritizing, and Copying Rules
- Use Manage Rules to change priority and set Stop If True.
- Edit Applies To directly; separate multiple ranges with
;. - Use Format Painter or Paste Special (Formats).
Using It with Tables, PivotTables, and Charts
- Tables (Ctrl+T) structured reference example:
=[@[Actual]]<[@[Target]] - For PivotTables, apply the rule to “All cells showing” the relevant field.
- Charts can indirectly use the source formatting colors.
Performance Optimization
- Minimize the number of rules and reduce ranges.
- Minimize volatile functions.
- Use Stop If True for early termination.
Practical Example (Sample Data)
| Department | Person in Charge | Target | January | February | March | Due Date | Notes |
|---|---|---|---|---|---|---|---|
| Sales | Hana Kim | 120 | 98 | 132 | 110 | 2025-09-22 | Possible delay |
| Sales | Dul Lee | 150 | 160 | 140 | 155 | 2025-09-20 | |
| Manufacturing | Set Park | 130 | 115 | 100 | 128 | 2025-09-25 | At risk |
| Human Resources | Net Choi | 90 | 92 | 88 | 85 | 2025-09-18 | |
| Finance | Daseot Moon | 110 | 100 | 118 | 95 | 2025-09-29 | Note: Review |
Troubleshooting
| Symptom | Cause | Solution |
|---|---|---|
| Applied only partially | Incorrect Applies To range | Reset the range in Manage Rules |
| Overlapping colors | Priority not set | Move rules up or down and use Stop If True |
| Formula not working correctly | Incorrect use of $ references | Redesign the formula based on the top-left cell |
| PivotTable does not expand | Target is fixed to a range | Change it to apply to the entire field |
| Slow performance | Too many rules or volatile functions | Consolidate rules and reduce ranges |