Conditional Formatting
Conditional Formatting automatically changes cell appearance based on the cell's value or a formula you specify. It's essential for making data visually meaningful at a glance.
Why Use Conditional Formatting
- Instantly spot trends, patterns, and outliers
- Highlight important data without manual formatting
- Create visual dashboards
- Make data self-explanatory
Types of Conditional Formatting
1. Highlight Cells Rules
Format cells based on their value:
- Greater than / Less than
- Between values
- Equal to
- Text that contains
- Dates (today, last week, etc.)
- Duplicate values
2. Top/Bottom Rules
Highlight based on ranking:
- Top 10 items
- Top 10%
- Bottom 10 items
- Above/Below average
3. Data Bars
Show values as horizontal bars within cells, like inline bar charts.
4. Color Scales
Apply gradient colors based on value—great for heat maps.
- 2-color scale (low to high)
- 3-color scale (low, mid, high)
5. Icon Sets
Display icons based on value thresholds:
- Traffic lights (red, yellow, green)
- Arrows (up, sideways, down)
- Stars, checkmarks, flags
Creating Conditional Formatting
Excel
- Select your range
- Home → Conditional Formatting
- Choose rule type
- Set conditions and formatting
- Click OK
Google Sheets
- Select your range
- Format → Conditional formatting
- Set up rule in the panel
- Click Done
Using Custom Formulas
The most powerful option—any formula returning TRUE applies the format.
Examples
Highlight entire row if column A is "Urgent":
=$A1="Urgent"
Highlight weekends:
=OR(WEEKDAY(A1)=1, WEEKDAY(A1)=7)
Alternating row colors:
=MOD(ROW(),2)=0
Above average values:
=A1>AVERAGE($A:$A)
Highlight duplicates:
=COUNTIF($A:$A, A1)>1
Managing Rules
Priority Order
Rules are applied in order. Earlier rules take precedence.
Stop If True
In Excel, check "Stop If True" to prevent later rules from applying.
Clear Rules
Home → Conditional Formatting → Clear Rules
Best Practices
- Less is more: Don't over-format—it becomes noise
- Be consistent: Use the same colors for the same meanings
- Test with data: Verify rules work with edge cases
- Document: Note what colors mean if not obvious
- Performance: Too many rules on large ranges can slow the file
Common Use Cases
- Sales Dashboards: Color-code performance metrics
- Project Tracking: Highlight overdue tasks in red
- Data Validation: Flag invalid entries
- Heat Maps: Visualize data density or intensity
- Progress Tracking: Show completion with data bars