Skip to content

How to remove duplicates in Excel in Excel

Return a list with every value once using UNIQUE, or delete repeated rows in place with the Remove Duplicates command.

You have a list that repeats itself: the same email in three rows, the same customer on every order. You want each value once.

There are two different jobs hiding in that sentence. One is to show a clean list while the original stays untouched. The other is to delete the repeats from the data itself. Use a formula for the first and the ribbon command for the second.

The formula way is UNIQUE. It spills a list of the distinct values, keeps the first appearance of each in its original order, and updates when the source changes. Because it never edits the source, it is the safe default.

The ribbon command, Remove Duplicates, permanently deletes rows. It keeps the first row for each match and removes the rest, and it can compare one column or several. Copy the data to a spare sheet first if you may need the original.

Two details trip people up. UNIQUE treats Ana@x.com and ana@x.com as the same value, because Excel's comparison ignores case. And a trailing space makes two values different, so clean the list with TRIM first if the counts look too high.

To see which values appear only once, rather than which are distinct, set the third argument of UNIQUE to TRUE. The Analysis track uses UNIQUE with FILTER and SORT to build summary tables.

2 ways to do it

1UNIQUE formula (the original list stays as it is)

=UNIQUE(A2:A13)

  1. Pick an empty cell with room below it, such as C2.
  2. Type =UNIQUE( and select the data range without the header, for example A2:A13.
  3. Close the bracket and press Enter. The distinct values spill down from C2.
  4. Add TRUE as the third argument to list only values that appear once.

2Remove Duplicates command (deletes rows in place)

  1. Select any cell in the list, or select the range you want to clean.
  2. On the Data tab, in the Data Tools group, choose Remove Duplicates.
  3. Tick the columns that together define a duplicate. Keep "My data has headers" ticked if row 1 is a header.
  4. Select OK. Excel reports how many duplicate rows it removed and how many unique rows remain.

Try it yourself

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In C2, list each email address once, in the order it first appears in A2:A13.

Answer in C2.

C2
A
B
C
D
E
F
1
Customer email
Distinct emails
Appear once
2
ana.lopez@example.com
3
ben.carter@example.com
4
chen.wei@example.com
5
ana.lopez@example.com
6
dana.ross@example.com
7
ben.carter@example.com
8
eli.stone@example.com
9
ana.lopez@example.com
10
farah.khan@example.com
11
chen.wei@example.com
12
gus.baker@example.com
13
dana.ross@example.com
14

Learn it properly, one graded sheet at a time.

Data analysis with formulas covers this in lesson 12, UNIQUE: lists and distinct counts.