Quick answer
To remove duplicates in Excel, click any cell in your list and go to Data > Remove Duplicates. Tick only the columns that decide whether two rows are the same, such as Email, and click OK. Excel keeps the first row of each set, deletes the later copies and tells you how many it removed. If the result looks wrong, press Ctrl+Z (Cmd+Z on a Mac) to get the rows back.
Duplicates get into a list when an export runs twice or when two people’s lists are pasted together. Excel can delete them in one step, but that step deletes whole rows, so decide first what counts as a duplicate and look at the copies before they go.
What counts as a duplicate
A duplicate is a row that repeats an earlier row in the columns you choose. Excel reads the list from the top: the first row with a given combination of values stays, and every later row with the same values in all the chosen columns is deleted. The other columns don’t protect a row. If the email matches, Excel removes the whole row even when the name is spelled differently.
So the columns you tick decide the result:
| Columns you tick | What counts as a duplicate | Good for |
|---|---|---|
| Email only | Any row whose email appeared higher up | Sign-up and contact lists |
| Every column | A row that matches an earlier one in every cell | An export that ran twice |
| Customer and Date | The same customer on the same day | An order log with one order per customer a day |
Excel compares what the cells show, character by character. A space at the end of an email makes it a different value, and so does a different number format: the same date shown as 12/2/2026 in one row and as Dec 2, 2026 in another counts as two values.
How to remove duplicate rows
Say you ran a webinar and exported the sign-ups from two tools, so some people are on the list twice. Column A holds their names and column B their emails. Tom Becker signed up once as Tom and once as Thomas, with the same email.
- Click any cell in the list.
- On the Data tab, in the Data Tools group, click Remove Duplicates.
- Leave My data has headers ticked when row 1 holds column names, so the names aren’t treated as data.
- Click Unselect All, then tick the column or columns that define a duplicate. Here that’s Email.
- Click OK.
Excel deletes the later copies and reports what it did: “2 duplicate values found and removed; 5 unique values remain.” When there’s nothing to remove, it says “No duplicate values found.”
On a Mac, Remove Duplicates is on the Data tab too: tick the columns and click Remove Duplicates. Excel for the web can remove duplicates as well.
Check first: flag duplicates with COUNTIF
Remove Duplicates doesn’t show you what it’s about to delete, but a formula can. The COUNTIF function counts the cells in a range that match a value, so this formula in C2 counts how many times the email in B2 appears in the whole list:
A count of 1 means the email is unique, and 2 or more means it has a copy, so with >1 added the cell shows TRUE for every email that appears more than once. The dollar signs lock the range to B2:B8 when you fill the formula down, while B2 has none and moves to each row’s own email. The free lesson Copy a formula down a column explains the dollar signs.
That version marks both rows of a pair. To mark only the rows Remove Duplicates would delete, let the range grow as the formula goes down:
$B$2 and ends at the formula's own row, so Ana Ruiz's first sign-up in row 2 shows FALSE and her second in row 5 shows TRUE. These are the two rows Remove Duplicates deleted. In C5, =COUNTIF($B$2:B5,B5)>1 returns TRUE. Formula in C: C2 =COUNTIF($B$2:B2,B2)>1, C3 =COUNTIF($B$2:B3,B3)>1, C4 =COUNTIF($B$2:B4,B4)>1, C5 =COUNTIF($B$2:B5,B5)>1, C6 =COUNTIF($B$2:B6,B6)>1, C7 =COUNTIF($B$2:B7,B7)>1, C8 =COUNTIF($B$2:B8,B8)>1.Type =COUNTIF($B$2:B2,B2)>1 in C2 and fill it down. Only the start of the range is locked, so in row 5 the formula reads B2:B5 and finds Ana Ruiz’s email for the second time. Turn on filters with Ctrl+Shift+L (Cmd+Shift+F on a Mac), show only TRUE, and look at the rows before you delete them.
Practice this in ProExcel
Count the orders for each region with one COUNTIF formula, filled down a column.
ProExcel checks your answer the moment you press Enter.
Why some duplicates survive
When a copy you can see on the screen is still there after Remove Duplicates, the two cells aren’t the same to Excel.
A space you can’t see
Exports and copy and paste often leave a space at the end of a cell. To Excel, an email with a space after it is a different value, so Remove Duplicates keeps both rows and COUNTIF counts them apart. LEN, which counts the characters in a cell, gives the space away.
=LEN( A3) counts 18 characters where A2 has 17, because the copy in row 3 ends with a space. Column C counts again after TRIM and finds 17 in both rows: without the space, the two emails match. In B3, =LEN(A3) returns 18.To fix a column, add a helper column with the TRIM function, such as =TRIM(B2), and fill it down. Copy the cleaned cells and paste them over the originals with Paste Special > Values (Ctrl+Alt+V, then V, then Enter; Cmd+Ctrl+V on a Mac), delete the helper column and run Remove Duplicates again. TRIM also turns runs of spaces between words into one. It leaves the nonbreaking space that comes with text copied from web pages, so if LEN still counts an extra character, =TRIM(SUBSTITUTE(B2,CHAR(160)," ")) swaps that space for a normal one first.
The free lesson Tidy text with TRIM, CLEAN, UPPER and PROPER practices TRIM on a sign-up list like this one.
The same value in two formats
Remove Duplicates compares what cells show, so the same date in two date formats counts as two values, and so does 1 next to 1.00. Select the column and give it one number format on the Home tab, then run Remove Duplicates again.
Subtotals or an outline
Remove Duplicates doesn’t work on a list with subtotals or an outline. Remove both first, then try again.
Keep the original list: UNIQUE or Advanced Filter
Sometimes you need the list without duplicates and the original untouched, such as when the sign-ups go to one colleague and the full export to another. In Microsoft 365, Excel 2021 and Excel 2024, on Windows and Mac, the UNIQUE function copies each value once and updates when the list changes:
Type it in an empty cell and the results spill down into the cells below it. =UNIQUE(A2:B8) does the same with whole rows. To list only the emails that appear exactly once, set the third argument to TRUE: =UNIQUE(B2:B8,,TRUE).
Older versions don’t have UNIQUE. Use the Advanced Filter instead: on the Data tab, in the Sort & Filter group, click Advanced, choose to copy the list to another location, tick Unique records only and pick the cell where the copy should start. On a Mac it’s Data > Advanced. Excel for the web has no Advanced Filter, so use UNIQUE there.
Remove duplicates from one column only
Select only that column’s cells and click Remove Duplicates. If the columns beside it hold data, Excel asks whether to expand the selection or continue with the current one.
Expanding uses the whole rows, which is right for most lists. Continuing removes duplicates in the selected column alone: its cells move up to close the gaps while the columns beside it stay where they are, so names and emails no longer line up. Continue only when the column stands on its own, such as a list of codes you pasted in to tidy up. If you’re unsure, expand, and if the result is wrong, undo it.
Frequently asked questions
How do I find duplicates in Excel without deleting them?
Add a column with =COUNTIF($B$2:$B$8,B2)>1 to show TRUE beside every value that appears more than once, or select the column and choose Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values to color them. Neither changes your data.
How do I highlight duplicates in a column?
Select the column, go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values and click OK. Excel colors every cell whose value appears more than once in the selection, and the colors go away by themselves once a value is no longer repeated.
Does Remove Duplicates keep the first or the last copy?
It keeps the first one, the copy nearest the top, and deletes the rows below it. To keep each person’s latest sign-up instead, sort the list by date, newest first, before you remove the duplicates.
How do I remove duplicate rows in Excel?
Click a cell in the list, choose Data > Remove Duplicates, click Select All so every column is ticked, and click OK. Excel then deletes only the rows that match an earlier row in every column.
Can I undo Remove Duplicates?
Yes. Press Ctrl+Z on Windows or Cmd+Z on a Mac straight after, and the deleted rows come back.
Why didn't Remove Duplicates remove all the duplicates?
The copies that stayed aren’t identical to Excel. A space at the end of one cell, or the same date or number in a different format, makes two values look the same but compare as different. Clean the column with TRIM and give it one format, then run Remove Duplicates again.
Practice this with real formulas
ProExcel's free course turns each idea into a formula you type yourself, checked the moment you press Enter. Five minutes a lesson, on your phone or computer.