Ravindra BagaleCourses & study guides Track your progress

Chapter 33

Conditional Formatting: Complete Guide

Learn every major Conditional Formatting tool in Excel — highlight rules, text and blanks, colour scales, data bars, icon sets, and formula rules that paint whole rows. Practice file includes working rules you can edit.

Ravindra Bagale’s Tip

Open the practice workbook first. Change a number and watch the colour move — that is how CF teaches itself.

About this data. Sales, support, warehouse, spend and student sheets mix Indian and foreign names with INR and USD. Demo data only — not a real company extract. File: https://ravindrabagale-cards.s3.ap-south-1.amazonaws.com/excel/ch33/ch33-cf-practice.xlsx.

1. Why conditional formatting matters

CF is a spotlight. You still need good data — CF only shows what is already there.

Why: Numbers alone are easy to skim past. Colour and icons make risks and wins jump out in a meeting.

What: Conditional Formatting (CF) paints cells when a rule is true — greater than, text contains, formula, colour scale, data bar, or icon set.

How:

  1. Open a sheet with numbers or status text (sales, scores, stock days).
  2. Ask: what should a manager notice in three seconds?
  3. Apply one clear CF rule per question — avoid rainbow overload.
  4. Test by changing a value and watching the colour update.
Before / setupRule or formulaResultMeaning
Orders 55 vs 9Highlight Cells > Greater Than 5055 green, 9 unchangedHigh-volume reps stand out

2. Highlight Cells Rules (number, text, date, duplicate)

Start with Highlight Cells Rules. They cover 80% of daily work.

Why: You need red/amber/green flags without writing formulas.

What: Home → Conditional Formatting → Highlight Cells Rules: Greater Than, Less Than, Between, Equal To, Text that Contains, A Date Occurring, Duplicate Values.

How:

  1. Select the values (example: Revenue column D2:D9).
  2. Home → Conditional Formatting → Highlight Cells Rules → Less Than…
  3. Type 20000, pick Light Red Fill, OK.
  4. Repeat for Status Equal To “Risk” with yellow fill.
  5. For duplicates: select Ticket IDs → Duplicate Values.
Before / setupRule or formulaResultMeaning
Revenue INR 15000Less Than 20000 → red fillCell turns redLow revenue risk flag

3. Text contains and blank cells

Blank rules catch incomplete forms before you mail the file.

Why: Notes and owner columns hide missing data and urgent words.

What: Use Text that Contains for keywords, or a formula rule =B2="" for blanks.

How:

  1. Select the Note column.
  2. Highlight Cells Rules → Text that Contains… → type urgent.
  3. For blanks: Conditional Formatting → New Rule → Use a formula → =B2="" (adjust column).
  4. Choose a fill so empty owners cannot be ignored.
Before / setupRule or formulaResultMeaning
Note: Contains urgent wordText contains “urgent”Orange fillKeyword catcher

4. Colour scales (heat maps)

Colour scales are perfect for inventory days and exam averages.

Why: You want a gradient from worst to best without many separate rules.

What: Colour Scales shade from a low colour through mid to high (often red → yellow → green).

How:

  1. Select the number range (Days of cover).
  2. Conditional Formatting → Color Scales → pick a 3-colour scale.
  3. Manage Rules → Edit Rule to set min / mid / max numbers if needed.
  4. Use one scale per sheet area so colours mean the same thing.
Before / setupRule or formulaResultMeaning
Days of cover 2 … 453-colour scale red–yellow–greenLow days red, high greenStock heat map

5. Data bars

Data bars beat a separate chart when space is tight.

Why: You want bar-chart length inside the cell for quick compare.

What: Data Bars draw a bar proportional to the value in the same cell.

How:

  1. Select Spend USD values.
  2. Conditional Formatting → Data Bars → Solid Fill (or Gradient).
  3. Edit Rule to show bar only, or bar + value.
  4. Keep the column number format (currency) readable.
Before / setupRule or formulaResultMeaning
Spend 1500 … 9100 USDData bar blueLonger bar = higher spendInline mini chart

6. Icon sets (traffic lights, arrows)

Match thresholds to your real targets — do not leave the default if your pass mark differs.

Why: KPIs need symbols managers already understand.

What: Icon Sets place traffic lights, arrows, or ratings beside (or instead of) the number.

How:

  1. Select Score % cells.
  2. Conditional Formatting → Icon Sets → 3 Traffic Lights.
  3. Manage Rules → Edit → set thresholds (example: ≥67 green, ≥33 yellow, else red).
  4. Tick “Show Icon Only” if the number is shown elsewhere.
Before / setupRule or formulaResultMeaning
Score 92%, 61%, 45%3 Traffic Lights by percentGreen / yellow / red iconsKPI status at a glance

7. Formula rules and whole-row highlight

The $ before the column letter keeps the test on one column while you paint many columns.

Why: Built-in rules cannot highlight an entire row when one column fails.

What: New Rule → Use a formula to determine which cells to format. Return TRUE to format.

How:

  1. Select the full table body A2:E7 (not only one column).
  2. New Rule → Use a formula → enter =$E2<60 (lock column E with $).
  3. Set a light red fill → OK.
  4. Add a second rule =$E2=MAX($E$2:$E$7) with green for the top average.
  5. Open Manage Rules → stop if true if rules should not stack.
Before / setupRule or formulaResultMeaning
Average column E=$E2<60 on A2:E7Whole row red when failRow-level attention

8. Manage, edit, clear, and copy CF

If colours look wrong, open Manage Rules before you add yet another rule.

Why: Rules pile up and fight each other.

What: Manage Rules lists every rule on the sheet. You can edit, delete, reorder, and stop if true. Paste Special → Formats copies CF.

How:

  1. Home → Conditional Formatting → Manage Rules… (set “This Worksheet”).
  2. Edit a rule or Delete as needed. Drag order — top rules run first.
  3. To clear: Clear Rules → From Selected Cells or Entire Sheet.
  4. To copy: Copy cell → Paste Special → Formats (includes CF).
Before / setupRule or formulaResultMeaning
Too many rulesManage Rules → delete / reorderClean rule listStable colours

Practice tasks (12)

  1. On HighlightCells, change Omar Farouk Orders from 61 to 40. Which CF colours change?
    Hint

    Watch the Orders column green/blue rules.

  2. Add a Greater Than rule on Revenue for values over 300000 with green fill.
    Hint

    Highlight Cells Rules → Greater Than.

  3. On TextAndBlank, type urgent into Neha’s blank note — confirm the text rule fires.
    Hint

    Text contains rule is on column D.

  4. Create a Duplicate Values rule on City in HighlightCells (copy the sheet first if you like).
    Hint

    Highlight Cells → Duplicate Values.

  5. On ColorScale, edit the rule so mid point is fixed at 15 days.
    Hint

    Manage Rules → Edit → Number midpoint.

  6. On DataBars, switch to Show Bar Only and note how the number hides.
    Hint

    Edit Rule → Show Bar Only.

  7. On IconSets, reverse the icon order and explain when reverse helps.
    Hint

    Edit Rule → Reverse Icon Order.

  8. On FormulaRules, change Devika’s Math to 90 — does her row leave the red rule?
    Hint

    Average must rise to 60+.

  9. Add a formula rule that greens any row where Science ≥ 90.
    Hint

    =$D2>=90 on A2:E7.

  10. On YourTasks, apply a colour scale to Qty and a Greater Than 5000 rule on Line total.
    Hint

    Select ranges then add two separate rules.

  11. Copy CF from HighlightCells Status column to a new column Flag using Paste Special Formats.
    Hint

    Copy → Paste Special → Formats.

  12. Clear all rules from YourTasks after you finish practising.
    Hint

    Clear Rules → Entire Sheet on that sheet.

Quick quiz

Q1. Where do you find Conditional Formatting?

Q2. Which rule type paints a heat map across many numbers?

Q3. To highlight a whole row when Average in E is under 60, which formula is best?

Q4. Duplicate Values is under which menu?

Q5. Data bars show…

Q6. “Stop If True” is set in…

Q7. Text that Contains “urgent” needs…

Q8. Paste Special → Formats will…

End-of-chapter checklist

  • I can apply Greater Than / Less Than / Between / Equal To / Text Contains / Duplicate rules.
  • I can build a colour scale, data bars, and an icon set with sensible thresholds.
  • I can write a formula rule with $ to shade a whole row.
  • I can Manage, Clear, and Paste-Special copy CF.

Quick revision cards (sample of 3)

Approved Excel card style: standalone, QR to this lesson. Full set can expand at deploy. Cards hosted on S3.

Highlight cells revision card
Highlight Cells Rules
Colour scales bars icons card
Scales, bars, icons
Formula CF revision card
Formula rules