To use conditional formatting in Excel, select your cells, go to Home, choose Conditional Formatting, pick a rule such as Highlight Cells Rules, set your condition and choose a format. For more control, choose New Rule, then Use a formula to determine which cells to format, and type a formula that returns TRUE for the cells you want coloured.


Start with a built-in rule

  1. Select the cells you want to format, for example a column of sales figures.
  2. On the Home tab, select Conditional Formatting.
  3. Choose Highlight Cells Rules, then Greater Than, Less Than, Between, Equal To, Text that Contains or A Date Occurring.
  4. Type your value, such as 1000, and pick a format from the drop-down list.
  5. Select OK. The formatting changes automatically if the numbers change.

These ready-made rules cover many everyday jobs, such as showing which invoices are over a set amount or flagging duplicate names.


Data bars, colour scales and icons

Under the same menu, Data Bars draw a small bar in each cell, so longer bars show bigger numbers. Colour Scales shade cells from low to high, which suits a quick heat map of monthly figures. Icon Sets add arrows or traffic lights. Use them sparingly: one visual style per table is easier to read than three.


Highlight a whole row with a formula

A formula rule lets you colour an entire row based on one cell. Suppose column D holds a status and you want every row marked 'Overdue' to turn light red.

  1. Select the whole data range, for example A2:E50, starting from the first data row, not the header.
  2. Choose Conditional Formatting, then New Rule, then Use a formula to determine which cells to format.
  3. Type =$D2="Overdue" and choose a fill colour under Format.
  4. Select OK.

The dollar sign before D locks the column, so every cell in the row checks column D. The row number has no dollar sign, so the rule moves down as it is applied to each row. This one pattern, written relative to the top-left cell of your selection, is the key to most advanced rules.


Flag dates that are coming up

To highlight tasks that are past due, select the due-date cells and use =$C2=TODAY(),$C2<=TODAY()+7). Make sure your dates are real Excel dates and not text, or the rule will not work.


Manage, edit and clear rules

Go to Conditional Formatting, then Manage Rules, and change the box at the top to This Worksheet. Here you can edit a rule, change the range it applies to, reorder rules and tick Stop If True. To remove formatting, choose Clear Rules, then either the selected cells or the entire sheet. If your file becomes slow or messy, copying and pasting a lot of cells can create many duplicate rules, so tidy them up here.


Common questions


Why is my conditional formatting not working?

Check that the range in Manage Rules covers your cells, that your formula refers to the top-left cell with the right dollar signs, and that your values are numbers or dates, not text.


Can I use conditional formatting in Google Sheets?

Yes. It is under Format, then Conditional formatting. Custom formulas work in a similar way, though the menus look different.


Does conditional formatting change my data?

No. It changes only how cells look. The underlying values stay exactly as they were.


Learn the full skill: Intermediate Excel: Lookups, Pivot Tables, Power Query and Dashboards

More plain-English answers: see all quick answers. Search more formulas in our free Excel formula finder.

Learn something new every week

One short, practical tip each Thursday, plus news when new courses open. Free, and you can unsubscribe in one click.

We'll never share your email. See our privacy policy.