How to eliminate duplicates in excel

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 4, 2026

Quick Answer: Excel offers several built-in tools to eliminate duplicate entries, primarily the 'Remove Duplicates' feature. You can also use Conditional Formatting to highlight duplicates and then manually delete them, or employ advanced formulas and Power Query for more complex scenarios.

Key Facts

Overview

Duplicate data can clutter your spreadsheets, lead to inaccurate analysis, and waste storage space. Fortunately, Microsoft Excel provides several efficient methods to identify and remove these redundant entries. Whether you're dealing with a simple list or a complex dataset, understanding these tools can significantly improve your data management efficiency.

Using the 'Remove Duplicates' Feature

This is the most straightforward and commonly used method for eliminating duplicates in Excel. It's designed to quickly scan selected data and remove entire rows that contain identical values in one or more specified columns.

How to use 'Remove Duplicates':

  1. Select the range of cells, table, or entire worksheet that contains the duplicates you want to remove.
  2. Go to the Data tab on the Excel ribbon.
  3. In the 'Data Tools' group, click on Remove Duplicates.
  4. A dialog box will appear, allowing you to select which columns Excel should check for duplicates. By default, all columns in your selection are checked. Uncheck any columns that should not be considered when identifying duplicates. For example, if you have a list of customers and want to remove duplicate entries based on email address only, you would uncheck all columns except the email column.
  5. Ensure that 'My data has headers' is checked if your selection includes a header row, so that Excel doesn't treat the headers as data.
  6. Click OK. Excel will inform you how many duplicate values were found and removed, and how many unique values remain.

Important Considerations for 'Remove Duplicates':

Using Conditional Formatting to Highlight Duplicates

While 'Remove Duplicates' deletes the data, Conditional Formatting allows you to *see* the duplicates first, giving you a chance to review them before deciding whether to delete them. This is a safer approach if you're unsure about the criteria for removal or want to manually verify.

How to use Conditional Formatting:

  1. Select the range of cells where you suspect duplicates exist.
  2. Go to the Home tab.
  3. In the 'Styles' group, click on Conditional Formatting.
  4. Hover over Highlight Cells Rules and then select Duplicate Values.
  5. In the dialog box, ensure 'Duplicate' is selected in the dropdown and choose a formatting style (e.g., light red fill with dark red text) from the second dropdown.
  6. Click OK. All duplicate cells within your selected range will now be highlighted.

After highlighting, you can then manually select and delete the highlighted rows, or use a filter to show only the highlighted rows and then delete them. To filter for highlighted cells:

  1. Select the column you want to filter by.
  2. Go to the Data tab and click Filter.
  3. Click the dropdown arrow in the column header.
  4. Choose Filter by Color and select the color you used for highlighting duplicates.

This will display only the duplicate rows, making them easy to select and delete.

Advanced Methods: Power Query

For more complex data cleaning tasks, including sophisticated duplicate removal, Microsoft's Power Query (available in Excel 2016 and later, or as an add-in for earlier versions) is a powerful tool. Power Query allows you to connect to data sources, transform the data, and load it back into Excel. It's particularly useful for recurring tasks and large datasets.

Basic Duplicate Removal in Power Query:

  1. Import your data into Power Query. You can do this by selecting your data range and going to Data > Get & Transform Data > From Table/Range.
  2. In the Power Query Editor, select the column(s) you want to check for duplicates.
  3. Right-click on the column header(s).
  4. Choose Remove Duplicates. Similar to the Excel feature, this removes rows where the selected column(s) have duplicate values.
  5. Alternatively, you can right-click on the column header, select Keep Duplicates, and then remove the remaining rows, or use the 'Group By' function for more control.
  6. Once you're satisfied, click Close & Load to load the cleaned data back into an Excel sheet.

Power Query records each transformation step, allowing you to easily refresh your data and reapply the cleaning process whenever new data is added.

Formulas for Identifying Duplicates

While not a direct removal tool, formulas can be used to identify duplicates. For instance, you can use the `COUNTIF` function in a helper column to count occurrences of each item. Rows with a count greater than 1 are duplicates.

Example Formula (in a helper column next to your data, assuming your data is in column A starting from A2):

=IF(COUNTIF(A:A, A2)>1, "Duplicate", "Unique")

You can then filter this helper column for "Duplicate" to see all redundant entries.

Choosing the right method depends on the size and complexity of your data, as well as your comfort level with Excel's features. For most common tasks, the 'Remove Duplicates' feature is efficient, while Conditional Formatting offers a visual check, and Power Query provides a robust solution for advanced data cleaning.

Sources

  1. Find and remove duplicates - Microsoft Supportfair-use
  2. Remove Duplicates in Excel (Step-by-Step Guide)fair-use
  3. How to Remove Duplicate Rows in Excel | Exceldemyfair-use

Missing an answer?

Suggest a question and we'll generate an answer for it.