LXLogicExcel
๐Ÿ”ฅ
0
โญ
0

How to Remove Duplicates in Excel (4 Methods)

By the LogicExcel Editorial Teamโ€ขUpdated June 2026โ€ข6 min readโ€ข1,180 wordsโ€ขPractice this โ†’

Try this now

These Order IDs have a repeat. Count how many times 1001 appears in A2:A6 with =COUNTIF(A2:A6,1001).
ABCD
1Order IDCustomer
21001Lee
31002Patel
41001Lee
51003Chen
61002Ortiz
C2fx

Continue the full lesson โ†’

Ready to practice?

Apply what you just learned with interactive exercises.

Start Practice โ†’

Excel's Remove Duplicates tool deletes repeated rows in one click. That is also why people lose data: it keeps the first row and silently drops the rest. Before you delete anything, decide whether you need to find the duplicates, highlight them, or build a unique list and leave the original alone.

Worked example used below โ€” a short order list:

A (Order ID)B (Customer)C (Amount)
1001Lee40
1002Patel75
1001Lee40
1003Chen20
1002Ortiz55
1001 is a true duplicate row. 1002 appears twice with different customers, so it is only a duplicate if you define uniqueness by Order ID alone.

Method 1: Remove Duplicates tool (Data tab)

Use this when you trust the data and just need a clean table.

  • Click any cell inside the range
  • Data โ†’ Remove Duplicates
  • Tick the columns that define a duplicate
- All columns checked โ†’ a row is a duplicate only if every column matches - Only Order ID checked โ†’ the second 1002 row is deleted even though the customer is different
  • Click OK
Excel keeps the first occurrence and deletes later ones. It reports how many rows were removed.

This is destructive. Work on a copy, or undo immediately with Ctrl+Z if the count looks wrong.

Method 2: Find duplicates first with COUNTIF

This is the method worth practicing. It does not delete anything. You see every repeat, then you decide.

In D2, next to the first order:

=COUNTIF($A$2:$A$6,A2)

Copy down. Results:

  • 1 โ€” that Order ID appears once
  • 2 or more โ€” it is a duplicate
Filter column D for values >1 to review the repeats. Sort D descending to group them.

To flag only the second and later occurrences (leave the first unmarked):

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

The range grows as you copy down. The first 1001 returns FALSE. The second 1001 returns TRUE.

To write a label instead of TRUE/FALSE:

=IF(COUNTIF($A$2:$A$6,A2)>1,"Duplicate","Unique")
Practice this on a live grid โ†’

Method 3: Highlight duplicates (no deleting)

  • Select A2:A6
  • Home โ†’ Conditional Formatting โ†’ Highlight Cells Rules โ†’ Duplicate Values
  • Pick a fill colour โ†’ OK
Every value that appears more than once is highlighted, including the first one. Useful in a review meeting. To highlight only later copies, use a formula rule:
=COUNTIF($A$2:A2,A2)>1

applied to A2:A6.

Method 4: UNIQUE โ€” a clean list, original left intact

In Microsoft 365 or Excel 2021, spill a distinct list of Order IDs without touching the source:

=UNIQUE(A2:A6)

For unique rows across several columns:

=UNIQUE(A2:C6)

UNIQUE is the right tool when you need a lookup list or a dropdown source and you do not want to delete history.

Which method to use

You needUse
A cleaned table, and you trust the first rowRemove Duplicates tool
To review before anything is deletedCOUNTIF helper column
To show the problem on a shared sheetConditional formatting
A unique list, original data keptUNIQUE
Case-sensitive matchingCOUNTIF cannot do this; use SUMPRODUCT((EXACT($A$2:$A$6,A2))*1)

Why "0 duplicates found" is usually a formatting problem

The values look the same and are not.

  • Trailing spaces โ€” "Lee " vs "Lee". Fix with =TRIM(A2) in a helper column, then remove duplicates on that column.
  • Numbers stored as text vs real numbers. Check alignment, or Data โ†’ Text to Columns to convert.
  • Invisible characters. Wrap with CLEAN.
TRIM is the most common fix. There is a TRIM practice lesson if that is the mess you actually have.

Frequently Asked Questions

How do I delete duplicates in Excel and keep the first row?

Data โ†’ Remove Duplicates. Excel always keeps the first occurrence of each unique key. There is no setting to keep the last row instead โ€” sort first if you need a different survivor.

How do I remove duplicate rows based on one column only?

In the Remove Duplicates dialog, tick only that column. Other columns are ignored when deciding what is a duplicate, but the entire row is still deleted.

Does Remove Duplicates care about letter case?

No. "Apple", "apple", and "APPLE" are treated as the same value.

Can I remove duplicates in one column without deleting the rest of the row?

No. The built-in tool always deletes full rows. To get a unique list of one column, copy that column to a new sheet and run Remove Duplicates there, or use =UNIQUE(A2:A6).

What is the difference between Remove Duplicates and UNIQUE?

Remove Duplicates edits the source in place. UNIQUE is a formula that spills a new list and leaves the source alone. Prefer UNIQUE unless you are deliberately cleaning a working table.

Practice How to Remove Duplicates in Excel (4 Methods) โ†’

Related tutorials