Skip to content

Remove Duplicates from Excel

Upload a sheet or paste a list, choose the columns that decide whether two rows match, and download the file with the repeats removed.

Updated

Choose a file or drop it here.xlsx .xls .xlsm .csv .tsv .txt .ods · up to 50 MB · opened on your device, not uploaded

How to remove duplicate rows

  1. Choose your file, or paste cells copied from Excel or Google Sheets and select Use pasted data.
  2. Leave First row is a header ticked if row 1 holds column names.
  3. Under Columns to compare, select the columns that decide a match. With none selected, a row is removed only when every column matches.
  4. Check the count of removed rows and the preview.
  5. Select Download .xlsx or Download .csv.

Your original file is not changed. The download is a new file.

Remove duplicates in Excel itself

With the Remove Duplicates button

  1. Click any cell inside the data.
  2. On the Data tab, select Remove Duplicates.
  3. Tick My data has headers if it does.
  4. Tick the columns to compare, then select OK.

Excel deletes the rows straight away and tells you how many were removed. Press Ctrl+Z to undo if the number looks wrong.

With the UNIQUE function

=UNIQUE(A2:C100)

UNIQUE leaves the original data alone and spills the de-duplicated rows into new cells. It needs Excel 365, Excel 2021 or later.

With Advanced Filter (any version)

  1. Select the data, then Data > Advanced.
  2. Choose Copy to another location, pick a destination cell, and tick Unique records only.

In Google Sheets

Select the range, then Data > Data cleanup > Remove duplicates. The =UNIQUE() function works the same way as in Excel.

Which method to use

Situation Best option
One-off clean of a file you were sent This page, or the Remove Duplicates button
You do not have Excel This page
The list keeps changing =UNIQUE()
You want to review repeats before deleting Find duplicates first
You need a count of each value Count unique values

Before you remove anything

  • Decide what a duplicate is. Two orders from the same customer are not duplicates; two rows with the same order number are.
  • Sort first if it matters which copy is kept.
  • Keep the original. Work on a copy until you have checked the result.

Limits

  • 50 MB per file. The comparison ignores leading and trailing spaces.
  • The download contains values. Formulas in the original are replaced by their results, and cell formatting is not carried over.

Questions

How do I remove duplicates in Excel?

Select a cell in your data, go to Data > Remove Duplicates, tick the columns that should match, and select OK. Or use the tool above, which shows the result before you download it.

Which row is kept when there are duplicates?

The first one from the top. Later rows with the same values in the compared columns are removed. Sort the sheet first if you want a particular row to survive, for example the newest.

Can I remove duplicates based on one column only?

Yes. Select only that column under Columns to compare. Rows are then treated as duplicates when that column matches, even if other columns differ.

Does upper and lower case matter?

Not by default, which is how Excel behaves, so ANA@EXAMPLE.COM and ana@example.com count as the same. Tick Match case to treat them as different.

Why are two rows that look the same not removed?

Usually one has an extra space or a different number format. This tool ignores spaces at the start and end of a cell. Inside Excel, clean the column with TRIM first.

Is there a formula that removes duplicates?

In Excel 365 and Excel 2021, =UNIQUE(A2:C100) returns the rows without repeats and updates when the data changes. It works in Google Sheets too.

Related