How to Remove Duplicates in Excel (3 Methods Compared)

To remove duplicates in Excel, you have three good methods — and picking the wrong one can delete data you needed. A customer appears three times in an export. The same order is logged twice. A mailing list has the same email address under slightly different names. Left alone, duplicates inflate counts, break lookups, and cause reports to lie.

Excel offers several ways to remove duplicates in Excel. Each one has strengths and drawbacks, and using the wrong one can delete data you actually needed. In this guide, I will walk through three methods — the built-in tool, formulas, and Power Query — and explain when to use each.

Remove Duplicates in Excel

Always Take a Backup First

Before removing any duplicates, save a copy of the file. Data cleanup is one of the few tasks in Excel where undo does not always save you. If you save the file, or if Power Query loads a new table, you may not be able to recover the deleted rows.

Rename the original sheet to “Original” and copy it before starting. When you are done, you will have a clean version and a backup of the raw data.

Method 1: The Built-In Remove Duplicates Tool

This is the fastest way to remove duplicates in Excel, and the one most users start with.

  1. Select your data range. Ideally, click inside the table so Excel detects the range automatically.
  2. Go to Data > Remove Duplicates.
  3. A dialog appears showing which columns are considered for duplicates. By default, all columns are checked. This means a row is only a duplicate if every column matches.
  4. If you want duplicates based on specific columns (for example, email address only), uncheck “My data has headers”, then pick only the columns you want. Or leave the header option on and select the relevant columns.
  5. Click OK. Excel tells you how many duplicates were removed and how many unique rows remain.

When to use this:

  • Simple data cleanup
  • When you want to delete duplicates permanently
  • When all columns matter or you are sure about the key column

When to avoid this:

  • When you want to keep the original data intact
  • When you want to see which rows were deleted
  • When duplicates differ slightly (for example, trailing spaces or inconsistent case)

The tool is fast but final. It does not show you what was removed. If a mistake happens, you need to reload your backup.

Method 2: Remove Duplicates with a Helper Formula

If you want to remove duplicates in Excel but keep the original data intact while you review them, use a formula.

  1. Add a helper column, for example column E, and call it “Count”.
  2. Write this formula in E2:
=COUNTIF($A$2:$A$100, A2)

This counts how many times the value in A2 appears in the range A2:A100. Copy it down.

  1. Values greater than 1 are duplicates. Values equal to 1 are unique.
  2. Filter the helper column to show only values greater than 1. That is your duplicate list.
  3. Delete or review them manually. Or filter to values equal to 1, copy the unique rows to a new sheet, and keep only the clean list.

For multi-column duplicates, use COUNTIFS:

=COUNTIFS($A$2:$A$100, A2, $B$2:$B$100, B2)

This counts rows where column A and column B match. Add more columns if needed.

Why this method is useful:

  • Nothing is deleted until you decide
  • You can see exactly what is duplicated
  • You can share the list with someone else for review

The downside is that it takes a few more steps. But for important data, that is worth it.

Method 3: Remove Duplicates with Power Query

Power Query is built into modern Excel and is the safest way to remove duplicates in Excel without touching your source data. It does not alter your source data. It creates a new table with the results.

  1. Select your data and go to Data > From Table/Range.
  2. Power Query Editor opens. From the Home tab, use the dropdown on “Remove Rows” and select “Remove Duplicates”.
  3. Power Query removes duplicate rows based on all columns. If you want duplicates based on a specific column, right-click that column header and choose “Remove Duplicates”.
  4. Review the preview. It shows the first few rows of the cleaned table. Check that the row count looks right.
  5. Click Close & Load. Power Query loads the cleaned data into a new sheet as a table. Your original data stays untouched.

Why Power Query is the best method for repeatable work:

  • Your source is never modified
  • You can refresh the query when new data arrives
  • Steps are recorded and can be reviewed
  • It works well with data that comes from CSV files, databases, or other sources

The downside is that it has a bit of a learning curve. But once you use it once, you will see why it is the preferred tool for serious data cleaning.

Choosing the Right Method

The right way to remove duplicates in Excel depends on whether the job is one-off or repeatable.

Use the built-in tool if:

  • You want a one-time cleanup
  • You have a backup
  • You do not need to review the deleted rows

Use formulas if:

  • You want to see what is duplicated before deleting anything
  • You want a list to share for review
  • Your data has two or more columns to compare

Use Power Query if:

  • Your data comes from a file that updates regularly
  • You want to keep the source untouched
  • You want to automate the cleanup process

Common Issues to Watch For

Most problems when you remove duplicates in Excel come from messy source data, not from the tool itself.

  1. Trailing spaces. “Rahul Sharma” and “Rahul Sharma ” (with a space at the end) look the same but are treated as different. Use TRIM on the source columns before removing duplicates. Or use Power Query’s Trim option.
  2. Case differences. “Rahul” and “rahul” are different values to Excel. If case does not matter, use Power Query or a formula with LOWER to normalize the data first.
  3. Formatting differences. Dates stored as text, numbers stored as text, and inconsistent date formats all cause false “duplicates”. Normalize the data first.
  4. Merged cells. The built-in tool does not work well with merged cells. Unmerge before running it.
  5. Blank cells. A column with blanks can produce unexpected results. Decide whether blank values count as duplicates. Power Query gives you options.
  6. Duplicate rows vs duplicate values. Excel distinguishes between deleting duplicate rows and deleting duplicate cells. The built-in tool deletes rows. Formulas can do either. Make sure you know which one you actually want.

A Practical Example: Cleaning a Customer List

Imagine you have a list of 5,000 customer records imported from a CRM export. Some customers appear twice because of inconsistent names. Some emails are duplicated. You want a clean list of unique customers by email. This is a typical case where you need to remove duplicates in Excel without losing a customer you actually want to keep.

Option A: Use the built-in tool and select only the Email column in the dialog. Excel keeps the first occurrence of each email and deletes the rest. Fast, but you cannot see which rows were removed.

Option B: Add a helper column with

=COUNTIF($B$2:$B$5000, B2)

Filter to values greater than 1. Review the duplicates manually. Then either delete them or copy the unique rows to a new sheet.

Option C: Load the data into Power Query, trim the Email column, make it lowercase for consistency, then Remove Duplicates based on Email. Load the result to a new sheet. The original data stays untouched, and next month you can paste the new export into the same folder and refresh the query.

For a one-time cleanup, Option A is fine. For recurring work, Option C is the right answer.

Frequently Asked Questions

Can I undo Remove Duplicates?

You can press Ctrl + Z immediately after running it, but if you save the file, the undo is gone. That is why backups matter.

Does Remove Duplicates preserve the first occurrence?

Yes. Excel keeps the first row it encounters and deletes the later ones.

Can I remove duplicates across multiple sheets?

Not with the built-in tool. To remove duplicates in Excel across sheets, combine the data first, either by copying or with Power Query.

Does Remove Duplicates work with Tables?

Yes, and it works well. When applied to a Table, the table shrinks to the remaining rows.

How do I count unique values instead of removing duplicates?

Use

=SUMPRODUCT(1/COUNTIF(range, range))

for older Excel, or

=COUNTA(UNIQUE(range))

in newer versions.

Can I remove duplicates in Excel without deleting the original data?

Yes. Use UNIQUE in a new column, or the helper-formula method. Both leave the source data untouched.

Remove Duplicates with the UNIQUE Function

In Microsoft 365 or Excel 2021, UNIQUE gives you a live list of unique values without deleting anything. Type this in an empty cell:

=UNIQUE(A2:A100)

Excel spills the unique values into the cells below. Combine it with FILTER to remove duplicates in Excel based on a condition:

=FILTER(UNIQUE(A2:A100), UNIQUE(A2:A100)<>"")

The list updates itself when the data changes.

Prevent Duplicates with Data Validation

The best way to remove duplicates in Excel is sometimes to stop them being entered at all. Select the column, go to Data > Data Validation, choose Custom, and enter this formula for a range starting in A2:

=COUNTIF($A$2:$A$100, A2)=1

Excel now rejects any value that already exists in the column. Add an error message explaining why the entry was blocked.

Related guide: Using Conditional Formatting for Smarter Data Analysis → https://excelformulatutorials.info/conditional-formatting-analysis/

Related guide: COUNTIF vs COUNTIFS: The Complete Guide → https://excelformulatutorials.info/countif-vs-countifs/

Final Thoughts

To remove duplicates in Excel well, treat it as a workflow, not one tool. The built-in tool is fast but final. Formulas let you see what is there before deciding. Power Query keeps the source clean and lets you refresh in the future. Pick the method that fits the job, keep a backup, and check your data for trailing spaces, case differences, and mixed formats before you start. Clean data is not just easier to analyze. It is more trustworthy, and that is what makes a report worth reading.

Leave a Comment