ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Data tools
  3. How to Remove Duplicates in Excel (3 Ways)

How to Remove Duplicates in Excel (3 Ways)

By ExcelReady Team·Updated November 1, 2026·5 min read

The short answer

To remove duplicates in Excel, click inside your data and go to Data > Remove Duplicates. Tick the columns that must match for a row to count as a duplicate, then click OK. Excel deletes the repeats and keeps the first copy. To keep the original data, use =UNIQUE(A2:C9) in Microsoft 365, or Data > Advanced with Unique records only.

Key takeaways

  • Data > Remove Duplicates deletes repeated rows and keeps the first one; work on a copy.
  • The columns you tick decide what counts as a duplicate: all columns, or just one ID column.
  • =UNIQUE(range) builds a live list without duplicates and leaves the data untouched.
  • Advanced Filter with Unique records only copies a clean list in any Excel version.
  • Extra spaces make values different, so clean them with TRIM before removing duplicates.
On this page+
  1. What counts as a duplicate?
  2. Way 1: The Remove Duplicates button
  3. Way 2: The UNIQUE function
  4. Way 3: Advanced Filter with Unique records only
  5. Which way should you use?
  6. Why aren't my duplicates removed?
  7. Practise it

To remove duplicates in Excel, select your data and use Data > Remove Duplicates: Excel deletes repeated rows and keeps the first copy of each. If you'd rather not delete anything, the UNIQUE function or Advanced Filter builds a clean copy instead. This guide shows all three ways on one customer list, and how to choose which columns count as a duplicate.

What counts as a duplicate?#

A duplicate is a row whose values match another row in the columns you choose. That choice matters. Look at this list in A1:C9:

ABC
1CustomerCityPlan
2AcmeLeedsBasic
3BirchYorkPro
4AcmeLeedsBasic
5CedarBathPro
6BirchHullPro
7DeltaYorkBasic
8CedarBathPro
9AcmeLeedsPro
  • Checking all three columns, rows 4 and 8 are duplicates. They match rows 2 and 5 exactly.
  • Checking Customer only, rows 4, 6, 8 and 9 are duplicates, because Acme, Birch and Cedar already appeared.

Before deleting, it can help to see the repeats. The guide to highlighting duplicates colours them with one conditional formatting rule.

Way 1: The Remove Duplicates button#

This is the fastest way, and it changes the data in place. It works in every version of Excel on Windows and Mac.

  1. Make a copy of the sheet first: right-click the sheet tab and choose Move or Copy, then tick Create a copy.
  2. Click any cell inside the data.
  3. Go to Data > Remove Duplicates (Windows ribbon keys: Alt, A, M).
  4. Make sure My data has headers is ticked.
  5. Tick the columns that must match. Leave all ticked to compare whole rows.
  6. Click OK.

With all columns ticked, Excel reports that it found and removed 2 duplicate values and that 6 unique values remain. With only Customer ticked (click Unselect All, then tick Customer), it removes 4 rows and keeps one row each for Acme, Birch, Cedar and Delta.

Excel keeps the first row of each set, counting from the top. If you want to keep the newest record instead, sort the data newest first before removing duplicates. Press Ctrl+Z (Mac: ⌘Z) right away if the result is wrong.

Way 2: The UNIQUE function#

UNIQUE returns the list without repeats in a new place and leaves your data alone. It needs Microsoft 365, Excel 2021 or Excel 2024.

Excel formula
=UNIQUE(A2:C9)

Type it in E2 and it spills six rows: the same result as Remove Duplicates on all columns. Because it's a formula, it updates when the data changes. Add another "Delta, York, Basic" row and extend the range, and the result still shows Delta once.

UNIQUE has two optional arguments:

FormulaWhat it returnsRows
=UNIQUE(A2:A9)Each customer once4
=UNIQUE(A2:C9)Each distinct row once6
=UNIQUE(A2:C9,,TRUE)Only rows that appear exactly once4

The last one is different from removing duplicates: it drops every copy of a repeated row, so Acme-Leeds-Basic and Cedar-Bath-Pro disappear completely. The UNIQUE function guide explains each argument. To refer to the whole result later, use the spill range operator, as in =ROWS(E2#); see how the # spill reference works.

Way 3: Advanced Filter with Unique records only#

Advanced Filter copies the unique rows to a new spot, and it works in every version, including Excel 2019 and older.

  1. Click inside the data and go to Data > Advanced (in the Sort & Filter group).
  2. Choose Copy to another location.
  3. Check that List range is $A$1:$C$9.
  4. In Copy to, click an empty cell, such as E1.
  5. Tick Unique records only and click OK.

Excel copies the headers and the six unique rows to E1:G7. The result is fixed values, so run it again if the data changes. To check one column only, set the List range to that column, such as $A$1:$A$9.

Which way should you use?#

Pick by whether you want to keep the original and whether the data will change:

NeedBest way
Clean a list once, for goodRemove Duplicates
Keep the original and get a live listUNIQUE
Keep the original in Excel 2019 or olderAdvanced Filter
A list for a drop-down that updatesUNIQUE

The side-by-side comparison of UNIQUE vs Remove Duplicates goes deeper. A UNIQUE list also makes a good source for dynamic drop-down lists, and it's the first step in summarizing data without a pivot table.

Why aren't my duplicates removed?#

Excel only removes values that match exactly. If duplicates survive, check for:

  • Extra spaces. "Acme" and "Acme " (with a trailing space) are different. Clean the column with TRIM first.
  • Numbers stored as text. 1001 as a number and "1001" as text don't match. Convert the text with Data > Text to Columns or VALUE.
  • Different formats. Remove Duplicates compares what the cells display. The same date shown as 1/3/2024 in one cell and 1-Mar-2024 in another is not treated as a duplicate.
  • Only one column selected. If you selected a single column and chose Continue with the current selection, Excel compares and changes only that column, which can push its values out of line with the rest of each row. Undo, click one cell and choose Expand the selection instead.
  • Merged cells or subtotals. Remove them before you start.

Capital letters don't matter: Remove Duplicates and UNIQUE both treat "ACME" and "Acme" as the same value.

Practise it#

Cleaning duplicate rows is a standard task in data-entry and admin tests. Practise UNIQUE in a live spreadsheet: you type the formula and it checks it instantly. Then practise filtering a table to find and check repeats before you delete anything. Start with the exercise on this page.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Build a list with no repeated rows, without deleting anything. In E2, use UNIQUE on the whole table A2:C9 and press Enter.

fx
ABCDEF
1
Customer
City
Plan
2
Acme
Leeds
Basic
3
Birch
York
Pro
4
Acme
Leeds
Basic
5
Cedar
Bath
Pro
6
Birch
Hull
Pro
7
Delta
York
Basic
8
Cedar
Bath
Pro
9
Acme
Leeds
Pro
10
11
12

Tip: UNIQUE only needs the range. Select all three columns, without the headers.

Practise this in a lesson

LessonFilter a tableTurn on filter buttons with Ctrl+Shift+L, filter by one or several values and by a number condition, total and count only the visible rows with SUBTOTAL, then clear the filters.LessonUNIQUE: list and count distinct valuesPull a clean list of distinct regions or customers with UNIQUE, then count them with COUNTA.Function guideUNIQUEList distinct values with Excel's UNIQUE, count them with COUNTA, or find items that appear only once. Examples plus a live exercise.

Frequently asked questions

How do I remove duplicates in Excel but keep the first one?

+

Use Data > Remove Duplicates. Excel always keeps the first row of each set of duplicates, counting from the top, and deletes the rest. Sort the data first if you want a particular row to be the one kept.

How do I remove duplicates based on one column?

+

In the Remove Duplicates box, click Unselect All, then tick only that column, such as Customer ID. Rows are then treated as duplicates when that one column matches, even if other columns differ.

How do I remove duplicates without deleting the data?

+

Use =UNIQUE(A2:C9) in Microsoft 365 or Excel 2021 and later, or Data > Advanced with Copy to another location and Unique records only. Both leave the original rows in place.

Why doesn't Remove Duplicates find my duplicates?

+

The values aren't exactly the same. Extra spaces, numbers stored as text, or different number formats make Excel see them as different. Clean the data with TRIM and consistent formats, then try again.

Can I undo Remove Duplicates?

+

Yes, press Ctrl+Z (Mac: Cmd+Z) straight away. Once you save and close the file, the deleted rows are gone, so make a copy of the sheet first.

Sources

  • Find and remove duplicates - Microsoft Support
  • UNIQUE function - Microsoft Support
  • Filter data in a range or table - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What counts as a duplicate?
  2. Way 1: The Remove Duplicates button
  3. Way 2: The UNIQUE function
  4. Way 3: Advanced Filter with Unique records only
  5. Which way should you use?
  6. Why aren't my duplicates removed?
  7. Practise it

Keep reading

Comparisons· 7 min read

UNIQUE vs Remove Duplicates in Excel

Use the UNIQUE function when you want a list of distinct values that stays live and leaves your data untouched, such as a list of customers for a summary. Use Remove Duplicates when you really want to delete repeated rows from the data itself, such as cleaning an export once. UNIQUE needs Excel 2021, Excel 2024 or Microsoft 365.

Data tools· 6 min read

Summarize Data Without a Pivot Table

To summarize data without a pivot table, build the summary with formulas. Put =SORT(UNIQUE(B2:B9)) in F2 to list each category once, then =SUMIFS(D2:D9,B2:B9,F2#) in G2 to total each one. Use COUNTIFS or AVERAGEIFS for counts and averages. The summary updates as soon as the data changes, with no refresh.

Data tools· 6 min read

Find and Highlight Duplicates in Excel

To highlight duplicates in Excel, select the cells, go to Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values, and click OK. Every value that appears more than once turns red. To flag or count repeats with a formula instead, use COUNTIF: =COUNTIF($A$2:$A$9,A2)>1 is TRUE for a duplicate.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free