How to remove duplicates in Excel
- Click any cell in the data (or select the range).
- Data → Remove Duplicates (in the Data Tools group).
- Tick "My data has headers" if it does, and tick the columns that make a row a duplicate (all of them for exact duplicates). Click OK.
Excel keeps the first row of each group, deletes the others for good, and doesn't show you
which ones it removed: make a copy first. Its comparison ignores case ("ANN" and "ann" are
duplicates) but not spaces. To get the unique rows in another place without deleting
anything, use =UNIQUE(A2:C100) (Microsoft 365 and Excel 2021) or Data → Advanced
→ "Unique records only". To see duplicates first, select a column and use Home → Conditional Formatting
→ Highlight Cells Rules → Duplicate Values.
How to remove duplicates in Google Sheets
Select the data, then Data → Data cleanup → Remove duplicates, tick "Data has header row"
and the columns to compare. Or put =UNIQUE(A2:C) in an empty cell to list each distinct
row once, leaving the original data as it is.
When to use this tool instead
For CSV files, opening them in Excel to remove duplicates also changes the data (leading zeros, long numbers, dates). Here the file is never reinterpreted, you can choose to ignore case and spaces or not, keep the first or the last of each group, and download the removed rows to check them.
Questions
- Which duplicate is kept?
- The first one, in file order, unless you choose "Keep the last". The rows that are kept stay in their original order.
- How do I remove rows with the same email (or ID) even if other columns differ?
- Choose "Rows with the same values in these columns" and tick the email column. Tick several columns to treat rows as duplicates only when all of them match, such as first name and last name.
- Are "ann@x.com" and "Ann@x.com " duplicates?
- Only if you tick "Ignore upper/lower case" and "Ignore spaces at the start and end". The values written to the result are always the original ones.
- Can I see what was removed?
- Yes: the removed rows are listed below the result, and "Download the removed rows" saves them as their own file, so you can check them or keep them.
- Is my file uploaded?
- No. Duplicates are found and removed in your browser, on your computer.
Related tools
- Compare Two Excel or CSV Files Compare two Excel or CSV files online and see added, removed and changed rows, matched by order or by an ID column. Free; files stay on your computer.
- Merge CSV or Excel Files Merge several CSV or Excel files, or the sheets of a workbook, into one. Columns are matched by name. Free, and your files never leave your computer.
- CSV and Excel Viewer and Editor Online Open CSV, Excel, JSON and XML files in your browser: view millions of rows, sort, search, edit cells and save. Free, no install, nothing is uploaded.