New Tool Radar

AI for Data & Spreadsheets

How to Flag Duplicate Values with Conditional Formatting in Excel

Highlight duplicate values in Excel with conditional formatting so duplicates stand out without deleting any rows.

Schematic illustration for How to Flag Duplicate Values with Conditional Formatting in Excel: three numbered steps - Select the column; Conditional Formatting, Duplicates; Review each highlighted cell.

Duplicates are easier to judge when they are highlighted rather than deleted, because some repeats are genuine and some are errors. Conditional formatting colours every duplicated value, so the list can be reviewed row by row before anything is removed.

Prerequisites

  • Excel
  • A column that may hold duplicate values
  • A copy of the source file, so the original stays untouched.

Steps

  1. Select the column to check, then go to Home, Conditional Formatting, Highlight Cells Rules, Duplicate Values.
  2. Choose a fill colour and click OK, then look for the coloured cells in the column.
  3. Read each highlighted value against the source and decide whether it is a genuine repeat or an error.
  4. Remove only the values confirmed as errors, using Data, Remove Duplicates on a copy first.
  5. Keep the formatting in place until the review is done, then clear it if the sheet is shared.

Worked example: Fictional order list with duplicates flagged

The practice table below is a fictional five-order list where one order number repeats. The count column is 1 per row, and the total is the number of rows. The table below is fictional practice material, with fictional values. It is the expected result, worked out by hand, not a run of any tool.

Order Count
ORD-901 1
ORD-902 1
ORD-901 1
ORD-903 1
ORD-904 1
Total 5

Expected result. Five rows, ORD-901 highlighted twice, and the count is 5.

Limits

  • Conditional formatting highlights values, it does not delete them, so a second step is needed to remove duplicates.
  • A value that differs by a trailing space will not be flagged as a duplicate, so trim the column first.

Sources

See all