Cellgrids Cellgridsby LearnWithRinkesh
Home › Excel tutorials › How to Highlight Duplicates in Excel

How to Highlight Duplicates in Excel Using Conditional Formatting

By Rinkesh Shah · Business Analyst, 8 years in data · Updated 2026-10-31

▶ Video coming soon

Highlighting duplicates is a quick way to spot repeated IDs, emails or invoice numbers before they cause errors.

Built-in rule

  1. Select the column (or range) to check.
  2. Go to Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values.
  3. Pick a colour and click OK.

Every value that appears more than once is highlighted, including the first one.

Highlight only the later copies

Use a formula rule so the first occurrence stays unmarked. Select the range (say A2:A100), choose New Rule → Use a formula, and enter:

=COUNTIF($A$2:A2, A2)>1

Highlight the whole row

Select all your data rows (A2:F100) and use this formula, which looks at column A only:

=COUNTIF($A$2:$A$100, $A2)>1

The dollar signs keep the check on column A while the formatting applies to the full row.

Duplicates across several columns

When a duplicate means the same name and date, use COUNTIFS: =COUNTIFS($A$2:$A$100, $A2, $B$2:$B$100, $B2)>1.

Next step

Once you have reviewed the highlighted rows, remove them with Data → Remove Duplicates or filter by colour.

Worked example

Select A2:A100, go to Home → Conditional Formatting → Highlight Cells Rules → Duplicate Values, and pick a colour. To highlight only repeats after the first: rule formula =COUNTIF($A$2:A2,A2)>1.

Common mistakes

Frequently asked questions

Can I highlight duplicates across two columns?

Yes, use a formula rule like =COUNTIFS($A:$A,$A2,$B:$B,$B2)>1.

Is it case sensitive?

No.

How do I remove them?

Data → Remove Duplicates.

Practice this online, free

Reading is only half of learning Excel. Cellgrids is a free place for online Excel practice: solve Excel formula exercises in a live spreadsheet, prepare for Excel interview questions, and work through business case studies built for data analytics and business analytics roles.

Practice these formulas: COUNTIF, COUNTIFS.

Start Excel practice → Case studies