How to remove duplicates in Excel
To remove duplicates in Excel, select your data, go to Data, Remove Duplicates, check the columns that define a duplicate and click OK. Excel keeps the first row of each set and deletes the rest.
By Operelio team · Updated October 8, 2026
On this page10
- 1.Four ways to find and remove duplicates
- 2.Before you start: see what you are about to delete
- 3.How to remove duplicates with Remove Duplicates
- 4.How to remove duplicates in one column
- 5.How to remove duplicates with a formula
- 6.How to remove duplicates with Power Query
- 7.Why Excel leaves some duplicates behind
- 8.Catch the duplicates Excel leaves behind
- 9.Using Google Sheets instead
- 10.Frequently asked questions
Four ways to find and remove duplicates
Remove Duplicates is the quickest, but it deletes rows in place. The other three leave your data alone.
| Method | Use it for | Changes your data |
|---|---|---|
| Conditional Formatting | Seeing the duplicates before you delete anything | No, it only highlights |
| Remove Duplicates | A one-off cleanup of a list | Yes, it deletes rows |
| UNIQUE formula | A duplicate-free copy that updates when the list changes | No, it writes a new list |
| Power Query | A cleanup you repeat on every new export | No, it loads a new table |
Before you start: see what you are about to delete
Excel's Remove Duplicates deletes rows the moment you click OK. There is no preview and no report of which rows went, so two minutes of preparation saves a lot of guessing afterwards.
First, work on a copy of the file, or at least keep Ctrl+Z (Cmd+Z on Mac) ready. Second, highlight the duplicates before you remove anything: select the column that defines a duplicate, then go to Home, Conditional Formatting, Highlight Cells Rules, Duplicate Values. Every repeated value lights up, so you can scan what is about to go.
If you want a flag you can filter on instead, add a helper column with =COUNTIF($C$2:$C$1000,C2)>1 (swap C for your key column and 1000 for your last row). It shows TRUE on every row whose value appears more than once, so you can review the repeats before deleting anything.
Excel always keeps the first occurrence of each duplicate and silently deletes the rest. If you care which row survives, sort first: for example, sort by a Last activity column with newest at the top, so the most recent row is the one Excel keeps.
How to remove duplicates with Remove Duplicates
Remove Duplicates, on the Data tab, deletes every row that matches an earlier row on the columns you pick. It is the quickest way to clear exact repeats from a list.
Select your data
Click any single cell inside your list and Excel finds the edges of the data for you. One catch: that auto-detection stops at the first fully blank row, so if your list has blank rows in it, select the whole range yourself, headers included. Clear any filters and unmerge merged cells first (Home, Merge & Center), or the range can come out wrong.
Open Remove Duplicates
On the Data tab, click Remove Duplicates in the Data Tools group. The button lives in the same place on Windows and Mac.
Choose the columns
Check only the columns that define a duplicate. Checking every column means a row is removed only when it matches another row on every single value, so one differing phone number keeps both copies. For a contact list, matching on Email alone usually catches what you actually mean by a duplicate. Leave the headers box checked if your first row is headers; Excel calls it My data has headers on Windows and My list has headers on Mac.
Confirm
Click OK. Excel tells you how many duplicate values it found and removed and how many unique values remain. Sanity-check that number against what the conditional formatting showed you. If far more disappeared than you expected, press Ctrl+Z and review which columns you checked.
How to remove duplicates in one column
Select only that column, then Data, Remove Duplicates. If the column sits next to other data, Excel asks what to do with it first:
| Choice | What Excel does |
|---|---|
| Expand the selection | Removes whole rows, comparing only the columns you check next. Pick this when each row is one record, like a contact list. |
| Continue with the current selection | Removes duplicate cells from that column alone and moves the cells below up, so the rest of each row no longer lines up with it. Pick this only when the column stands on its own. |
Either choice opens the Remove Duplicates dialog next. After Continue with the current selection, My list has headers can start unchecked, and then Excel counts the header as one of the values. Check it before you click OK.
How to remove duplicates with a formula
The UNIQUE function returns a list with the duplicates left out and keeps your original as it is. Type =UNIQUE(A2:D200) in an empty cell, with your own range, and the duplicate-free rows spill into the cells below and to the right. Point it at one column, like =UNIQUE(C2:C200), to get that column's values once each.
The result updates when the source list changes. If the cells it needs are not empty, it shows #SPILL! until you clear them. The copy doesn't keep the original's formatting, so a date column comes out as numbers like 46029 until you format it as a date again. UNIQUE compares whole rows of the range you give it, and its third argument, TRUE, does something else: it returns only the values that appear exactly once.
UNIQUE is in Excel for Microsoft 365, Excel 2021 and later, and Excel for the web. In older versions, use Data, Advanced (in the Sort & Filter group), choose Copy to another location, pick a destination cell and check Unique records only.
How to remove duplicates with Power Query
Power Query is worth the setup when the same list arrives every week: you build the steps once and refresh them on each new file.
Load the list into Power Query
On Windows, click inside your data and choose Data, From Table/Range. Excel turns the range into a table if it isn't one already; leave My table has headers checked. The Power Query editor opens. Excel for Mac has no From Table/Range: save the workbook, then choose Data, Get Data (Power Query), Excel workbook, pick the file you just saved, select the sheet and click Transform data.
Pick the key columns
Click the header of the column that defines a duplicate, such as Email. Hold Ctrl (Cmd on Mac) to add more columns.
Remove the duplicates
Home, Remove Rows, Remove Duplicates. The editor doesn't show a row count, so use Transform, Count Rows to see how many are left, then delete that step. Power Query compares case, so Jane@Example.com and jane@example.com both stay. To match them, lowercase the column first with Transform, Format, lowercase. Power Query doesn't promise to keep the first copy either, so if it matters which row stays, use Remove Duplicates in Excel instead.
Load the result
Home, Close & Load puts the cleaned table on a new sheet and leaves the original range alone. When the source changes, Data, Refresh All runs the same steps again. On a Mac the query reads the saved workbook, so save your changes before you refresh.
Why Excel leaves some duplicates behind
Remove Duplicates compares the value each cell displays. It does ignore casing, so WESTMARCH and Westmarch count as the same, but everything else has to match exactly, and that is where real contact lists slip through:
| What it misses | Example |
|---|---|
| Stray spaces | jane@example.com with a trailing space survives next to the clean version. Run TRIM on the key column first, then Paste Special, Values. |
| Same date, different format | 3/8/2026 and 08 Mar 2026 count as two values, though the date is the same |
| Punctuation and abbreviation variants | Westmarch Ltd versus Westmarch, Ltd. versus Westmarch Limited |
| Typos and small differences | Jon versus John, or Smith versus Smyth |
| Reformatted values | +44 20 7946 0199 versus 020 7946 0199 |
| The same person in two files | Remove Duplicates works on one range, so merge the files into one sheet first |
TRIM and a careful sort fix the spaces and the which-row-survives problem, but no formula makes Westmarch, Ltd. equal Westmarch Ltd. That takes matching that ignores company suffixes and punctuation, or one that scores how similar two values are, as below.
Catch the duplicates Excel leaves behind
Operelio's Deduplicate tool is built for the rows Excel leaves behind. Pick one or more columns to match on and it compares every row on those columns. Before you click Run, a live preview counts the duplicate groups and how many rows will be removed. Your original file is never changed: the result is a new file.
You also choose whether the first or the last occurrence in each group survives, which matters when later rows carry the more recent data. Then pick how to match: exact, smart or similarity. Smart matching catches the same record written differently, such as Westmarch Ltd versus Westmarch, Ltd. or (415) 555-0172 versus +1 415 555 0172. Similarity matching catches typos and small differences, such as Jon Smith versus John Smith. When you match on email with exact or smart matching, blank emails don't count as a match unless you switch that off. You can download the removed rows as a separate file to review exactly what was dropped. All three ways of matching are on every plan. It reads .csv, .xlsx, and .xls files.
If the list is headed for a CRM, this step matters more than it looks: HubSpot matches contacts by email when you import, so two rows with the same email become one contact, and one person under two email addresses becomes two.
Using Google Sheets instead
Google Sheets has its own tool, under Data, Data cleanup, Remove duplicates, and a UNIQUE function that works like Excel's. The menus and their quirks differ, so Sheets gets its own how-to.
Remove the duplicates Excel misses, and choose which row in each group to keep.
Related
- How to clean a customer list without Excel formulas
- How to remove duplicates in Google Sheets
- How to remove spaces in Excel
- How to merge two Excel files into one
- How similarity matching finds duplicate contacts
- How to find, merge and prevent duplicate contacts in HubSpot
- Deduplicate tool
- Is the spreadsheet warrior a dying breed?
Frequently asked questions
How do I remove duplicates in Excel?
Click a cell in your list, go to the Data tab, and click Remove Duplicates. Check the columns that define a duplicate, leave the headers box checked, and click OK. Excel deletes rows that match on all checked columns and keeps the first occurrence of each.
Does Remove Duplicates delete the whole row?
Yes, within the range you selected: every column of a duplicate row goes, including columns you did not check. Cells outside the selected range stay put, which is why removing duplicates from one column of a larger table can leave the rows misaligned.
Does Excel's Remove Duplicates ignore upper and lower case?
Yes. WESTMARCH, Westmarch, and westmarch count as the same value, so casing differences are removed correctly. What it does not ignore is spacing, punctuation, or formatting: a trailing space or an extra comma makes two values different.
Can I choose which duplicate Excel keeps?
Not directly. Excel always keeps the first occurrence, so sort the list first to put the row you want on top, for example newest activity first. Operelio's Deduplicate tool lets you keep the first or the last row in each group.
Ready to get started?
Upload a file and run your first transformation. Free, no credit card required.