Select your cells, then go to Home › Conditional Formatting and pick a rule such as Highlight Cells Rules › Greater Than. For custom logic, choose New Rule › Use a formula to determine which cells to format.

You often need to spot values at a glance: late dates, low stock, sales above target, or duplicate names. Conditional formatting colours cells automatically when they meet a rule, so you do not have to scan the sheet by hand.
Step by step
- Select the cells you want to format, for example A2:A10. Include the header only if you want it formatted too.
- On the Home tab, click Conditional Formatting.
- To highlight numbers, point to Highlight Cells Rules and choose Greater Than, Less Than, Between, or Duplicate Values. Type the value and pick a format, then click OK.
- For your own logic, click New Rule, choose Use a formula to determine which cells to format, and enter a formula that refers to the top-left cell of your selection, such as =B2>100.
- Click Format, choose a fill colour, and click OK twice. The rule applies to every selected cell.
- To remove rules, select the cells and use Conditional Formatting › Clear Rules › Clear Rules from Selected Cells.
On a Mac: On a Mac the same options are under the Home tab; the Conditional Formatting button and menus look the same.
Before and after
| A | B | C | |
|---|---|---|---|
| 1 | Item | Stock | |
| 2 | Pens | 12 | |
| 3 | Paper | 4 | |
| 4 | Ink | 25 | |
| 5 | Staples | 3 |
| A | B | C | |
|---|---|---|---|
| 1 | Item | Stock | |
| 2 | Pens | 12 | |
| 3 | Paper | 4 | |
| 4 | Ink | 25 | |
| 5 | Staples | 3 |
With a formula instead
| Formula | Use it when |
|---|---|
=IF(B2<5,"Low","OK") | You want a text label instead of a colour, or you need the result in another cell for sorting or filtering. |
Practise it
Free exercises with instant feedback. No sign-up needed.
Common mistakes
- The rule colours the wrong cells because the formula uses a fixed reference like $B$2. Use a relative reference to the top-left cell of the selection, such as =B2>100, so Excel adjusts it for each row.
- The rule applies to the whole sheet and slows the file down. Select only the range you need, or edit the rule under Conditional Formatting › Manage Rules and change Applies to.
- Rules seem to disappear after copying cells. Use Paste Special › Formats, or copy the whole row, so the conditional formatting comes with the cells.
Questions people also ask
How do I highlight an entire row based on one cell?
Select the rows, create a New Rule with a formula, and lock the column: =$B2="Late". The dollar sign keeps the check on column B while the row number changes.
Can I use conditional formatting to find duplicates?
Yes. Select the cells, then use Conditional Formatting › Highlight Cells Rules › Duplicate Values.
Why is my conditional formatting not working?
Check the Applies to range in Manage Rules, make sure the formula returns TRUE or FALSE, and confirm the rule is not stopped by an earlier rule with Stop If True.
Functions used
Steps written for Excel for Microsoft 365 on Windows. All how-to guides