what is conditional formatting in excel with example
Conditional formatting in Excel lets you automatically change how cells look (color, icons, data bars, etc.) based on rules you set, so important values stand out without you manually formatting anything.
What is conditional formatting in Excel?
Conditional formatting is a feature that changes cell appearance when
certain conditions are true.
For example, you can:
- Color all sales above a target in green.
- Highlight overdue dates in red.
- Mark duplicate entries.
- Show data bars or color scales to visualize large vs small numbers.
The key idea: Excel looks at each cell, checks your rule, and if the condition is met, it applies the format automatically.
Simple example (step‑by‑step)
Imagine you have a list of monthly sales in column B (B2:B10), and you want to highlight all sales greater than 10,000.
- Select the range B2:B10.
- Go to the Home tab.
- Click Conditional Formatting.
- Choose Highlight Cells Rules → Greater Than….
- In the box, type
10000. - Choose a format, for example “Light Red Fill with Dark Red Text” or a green fill.
- Click OK.
Now:
- Any value in B2:B10 greater than 10,000 will automatically be highlighted.
- If you later change a number from 9,000 to 12,000, it will instantly get the formatting.
Example using a formula
You can also use your own formula to decide when to format cells. Scenario: You have employee data:
- Column A: Name
- Column B: Department
- Column C: Salary
You want to highlight all rows where Department is "Sales".
-
Select the full range, for example
A2:C20. -
Go to Home → Conditional Formatting → New Rule.
-
Choose Use a formula to determine which cells to format.
-
In the formula box, enter:
=$B2="Sales" -
Click Format… and choose a fill color (e.g., light yellow).
-
Click OK , then OK again.
What this does:
- For each row, Excel checks if the value in column B is "Sales".
- If true, it formats the entire row A–C for that row.
Other common conditional formatting examples
Some typical real‑world uses:
- Highlight top 10 performers in a list.
- Color all dates that are past today (overdue tasks) in red.
- Use color scales so low values are in red and high values in green.
- Show data bars inside cells to make a quick “in‑cell bar chart” of numbers.
These all help you quickly see patterns, extremes, and problems without reading every value one by one.
Mini FAQ
Q: Does conditional formatting update automatically?
Yes. If the data changes and a cell no longer meets the condition, the
formatting will update automatically. Q: Can I remove it?
Yes. Select the range, go to Home → Conditional Formatting → Clear Rules
and choose the appropriate option.
SEO bits for your topic
- Main focus phrase: what is conditional formatting in excel with example
- Sample meta description:
“Learn what conditional formatting in Excel is, with simple step‑by‑step examples that show you how to highlight important data automatically.”
TL;DR:
Conditional formatting in Excel is a smart way to automatically highlight or
style cells based on rules you define, like “greater than 10,000” or
“department equals Sales,” so key information jumps out at you.