Home Guides Excel

Excel

How to Use Conditional Formatting in Excel: Practical Rules

Learn how to use Excel conditional formatting to highlight duplicates, overdue dates, thresholds, top values and custom conditions without changing the underlying data.

In this guide Step-by-step explanations, practical examples and useful context to help you complete the task confidently.

Conditional formatting is useful when you need a spreadsheet to show you what deserves attention. Instead of scanning hundreds of rows manually, you can create rules that highlight values based on their contents.

The formatting changes how a cell is displayed; it does not change the underlying value.

Highlight values above a threshold

Select the range, open Home > Conditional Formatting, choose a rule such as Greater Than, enter the threshold and select a format. This is useful for sales targets, overdue amounts, scores or inventory levels.

Highlight duplicate values

For a list of IDs, emails or product codes, use the duplicate-values rule to make repeated entries visible before deciding whether they are actually duplicates. A repeated customer name, for example, may be legitimate if the rows represent separate orders.

Highlight overdue dates

If due dates are in A2:A100, a custom rule can compare them with today. A typical formula is:

=AND(A2<TODAY(),A2<>"")

The blank check prevents empty cells from being treated as overdue.

Highlight an entire row based on one cell

Suppose column C contains status and you want to highlight the whole row when the status is Pending. Select the entire data range and create a formula rule such as:

=$C2="Pending"

The dollar sign locks the status column while the row number remains relative, allowing the rule to evaluate each row correctly.

Use color scales and data bars carefully

Color scales and data bars can reveal relative differences quickly. They are most useful when the reader understands what the visual scale means. Avoid decorative formatting that makes a sheet harder to interpret.

Conditional formatting for a PivotTable

Excel also supports conditional formatting in PivotTable reports, although some rule types have additional considerations. Test the rule after refreshing or changing the PivotTable layout.

Common mistakes

  • Wrong starting cell: Formula-based rules depend on the first cell of the selected range.
  • Incorrect absolute references: Decide which row or column should move as the rule is applied.
  • Formatting blanks: Add an explicit blank check when blank cells should be ignored.
  • Too many competing rules: Multiple rules can make the visual result confusing.
  • Using formatting as data: A highlighted cell is still the same underlying value; do not rely on color alone for calculations.

A practical review workflow

  1. Select the exact data range.
  2. Write the business question: What should stand out?
  3. Choose the simplest rule that answers it.
  4. Test a row that should match and one that should not.
  5. Check blanks and boundary values.
  6. Review the result after sorting or refreshing the data.

Quick answer

Use conditional formatting when the goal is to make patterns, exceptions or thresholds easier to see. Start with a specific question, create the simplest rule that answers it, and test both matching and non-matching rows.

For data-quality cleanup, see How to Clean Data in Excel. For duplicate records, see How to Remove Duplicates in Excel. For interactive data entry, see How to Create a Drop-Down List in Excel.

You've reached the end

Use the related tools, FAQs and next guides below to continue from the topic you just learned.

Questions & answers

Frequently Asked Questions

Does conditional formatting change the value in a cell?

No. It changes the cell's appearance based on a rule; the underlying value remains unchanged.

How do I highlight an entire row based on a cell?

Select the full data range and use a formula rule such as =$C2="Pending", locking the status column while leaving the row relative.

Why is my conditional formatting highlighting the wrong rows?

Check the first cell in the selected range and the absolute/relative references in the rule.

Can conditional formatting work with PivotTables?

Yes, Excel supports conditional formatting in PivotTable reports, although some rule types have additional considerations.

Continue learning

Related Guides

Explore the next practical guide without leaving Tervilo.

Learn more

Related Articles

Understand the wider topic with an informative Tervilo article.