How do i remove duplicate records based on values in excel?

Find and remove duplicates

Excel for Microsoft 365 Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 Excel Starter 2010 More...Less

Sometimes duplicate data is useful, sometimes it just makes it harder to understand your data. Use conditional formatting to find and highlight duplicate data. That way you can review the duplicates and decide if you want to remove them.

  1. Select the cells you want to check for duplicates.

    Note: Excel can’t highlight duplicates in the Values area of a PivotTable report.

  2. Click Home > Conditional Formatting > Highlight Cells Rules > Duplicate Values.

    How do i remove duplicate records based on values in excel?

  3. In the box next to values with, pick the formatting you want to apply to the duplicate values, and then click OK.

    How do i remove duplicate records based on values in excel?

Remove duplicate values

When you use the Remove Duplicates feature, the duplicate data will be permanently deleted. Before you delete the duplicates, it’s a good idea to copy the original data to another worksheet so you don’t accidentally lose any information.

  1. Select the range of cells that has duplicate values you want to remove.

  2. Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates.

    How do i remove duplicate records based on values in excel?

    For example, in this worksheet, the January column has price information I want to keep.

    How do i remove duplicate records based on values in excel?

    So, I unchecked January in the Remove Duplicates box.

    How do i remove duplicate records based on values in excel?

  3. Click OK.

Need more help?

How do i remove duplicate records based on values in excel?

Need more help?

The tutorial explains how to remove duplicates in Excel 2019, Excel 2016, Excel 2013, and Excel 2010. You will learn a few different techniques to find and delete duplicate values with or without first occurrences, get rid of duplicate rows, detect absolute duplicates and partial matches.

Although Microsoft Excel is primarily a calculation tool, its sheets are often used as databases to keep track of inventories, make sales reports or maintain mailing lists.

A common problem that occurs as a database grows in size is that many duplicate rows appear in it. And even if your huge database contains just a handful of identical records, those few duplicates can cause a whole lot of problems, for example mailing multiple copies of the same document to the same person, or calculating the same numbers more than once in a summary report. So, before using a database, it makes sense to check it for duplicate entries, to make sure you are not wasting time on repeating your efforts.

In a couple of our recent articles, we discussed various ways to identify duplicates in Excel and highlight duplicate cells or rows. However, there may be situations when you may want to ultimately eliminate duplicates in your Excel sheets. And that's exactly the subject of this tutorial.

All modern versions of Excel 2019 - 2007 have a built-in tool for removing duplicates called, not surprisingly, Remove Duplicates.

This tool allows you to find and remove absolute duplicates (cells or entire rows) as well as partially matching records (rows that have identical values in a specified column or columns). To perform this, follow the below steps.

Note. Because the Remove Duplicates tool permanently deletes identical records, it's a good idea to make a copy of the original data before removing duplicate rows.

  1. To begin with, select the range in which you want to ddelete dupes. To select the entire table, press Ctrl + A.
  2. Go to the Data tab > Data Tools group, and click the Remove Duplicates button.
    How do i remove duplicate records based on values in excel?
  3. The Remove Duplicates dialog box will open, you select the columns to check for duplicates, and click OK.
    • To delete duplicate rows that have completely equal values in all columns, leave the check marks next to all columns, like in the screenshot below.
    • To remove partial duplicates based on one or more key columns, select only those columns. If your table has many columns, the fastest way is to click the Unselect All button, and then select the columns you want to check for dupes.
    • If your table does not have headers, clear the My data has headers box in the upper-right corner of the dialog window, which is usually selected by default.
      How do i remove duplicate records based on values in excel?

Done! All duplicate rows in the selected range are deleted, and a message is displayed indicating how many duplicate entries have been removed and how many unique values remain.

How do i remove duplicate records based on values in excel?

Note. Excel's Remove Duplicates feature deletes 2nd and all subsequent duplicate instances, leaving all unique rows and first instances of identical records. If you want to eliminate duplicate rows including first occurrences, use one of the following solutions: filter out duplicates with 1st occurrences or utilize a more versatile Duplicate Remover for Excel.

Get rid of duplicates by copying unique records to another location

Another way to get rid of duplicates in Excel is separating unique values, and copying them to another sheet or a different workbook. The detailed steps follow below.

  1. Select the range or the entire table that you want to dedupe.
  2. Navigate to the Data tab > Sort & Filter group, and click the Advanced button.
    How do i remove duplicate records based on values in excel?
  3. In the Advanced Filter dialog window, do the following:
    • Select the Copy to another location radio button.
    • Verify whether the correct range appears in the List Range This should be the range you've selected on step 1.
    • In the Copy to box, enter the range where you wish to copy the unique values (it's actually sufficient to select the upper-left cell of the destination range).
    • Select the Unique records only box.

    How do i remove duplicate records based on values in excel?

  4. Finally, click OK, and the unique values will be copied to a new location:
    How do i remove duplicate records based on values in excel?

Note. Excel's Advanced Filter allows copying the filtered values only to another location on the active sheet. If you want to copy or move unique values or duplicate rows to another sheet or a different workbook, you can easily do it using our Duplicate Remover for Excel.

How to remove duplicate rows in Excel by filtering

One more way to delete duplicate values in Excel is to identify them using a formula, filter out, and then delete duplicate rows.

An advantage of this approach is versatility - it lets you find and delete duplicate values in one column or duplicates rows based on values in several columns, with or without first instances. A drawback is that you will need to remember a handful of duplicate formulas.

  1. Depending on your task, use one of the following formulas to detect duplicates.Formulas to find duplicate values in 1 column
    • Duplicates except 1st occurrences: =IF(COUNTIF($A$2:$A2, $A2)>1, "Duplicate", "")
    • Duplicates with 1st occurrences: =IF(COUNTIF($A$2:$A$10, $A2)>1, "Duplicate", "Unique")

    Where A2 is the first and A10 is the last cell of the range to be searched for duplicates.

    Formulas to find duplicate rows

    • Duplicate rows except 1st occurrences: =IF(COUNTIFS($A$2:$A2, $A2, $B$2:$B2, $B2, $C$2:$C2, $C2)>1, "Duplicate row", "Unique")
    • Duplicate rows with 1st occurrences: =IF(COUNTIFS($A$2:$A$10, $A2, $B$2:$B$10, $B2, $C$2:$C$10, $C2)>1, "Duplicate row", "Unique")

    Where A, B, and C are the columns to be checked for duplicate values.

    For example, this is how you can identify duplicate rows except for 1st instances:

    How do i remove duplicate records based on values in excel?

    For more information about using duplicate formulas, check out How to identify duplicates in Excel.

  2. Select any cell within your table, and apply Excel's auto filter either by clicking the Filter button on the Data tab, or Sort & Filter > Filter on the Home tab.
  3. Filter out duplicate rows by clicking the arrow in the header of the "Duplicate" column, and then check the "Duplicate row" box.If someone needs more detailed guidelines, please see How to filter duplicates in Excel.
  4. And finally, delete duplicate rows. To do this, select the filtered rows by dragging the mouse across the row numbers, right click them, and select Delete Row from the context menu. The reason you need to do this instead of simply pressing the Delete button on the keyboard is that it will delete entire rows rather than just the cell content:
    How do i remove duplicate records based on values in excel?

In a similar manner, you can find and delete a specific duplicate occurrence(s), for example only 2nd or 3nd instances, or 2nd and all subsequent duplicate values. You will find an appropriate formula and step-by-step instructions in this tutorial: How to filter duplicates by their occurrences.

Well, as you have just seen there is a number of ways to find and remove duplicates in Excel, each having its strong points and limitations. But what would you say if instead of those numerous duplicate removing techniques, you had one universal solution that wouldn't require memorizing a bunch of formulas and would work in all scenarios? The good news is that such a solution does exist, and I will demonstrate it to you in the next and final part of this tutorial.

Duplicate Remover - universal tool to find & delete duplicates in Excel

Unlike the inbuilt Excel Remove Duplicate feature, the Ablebits Duplicate Remover add-in is not limited to only removing duplicate entries. Like a Swiss knife, this multi-tool combines all essential use cases and lets you identify, select, highlight, delete, copy and move unique or duplicate values, absolute duplicate rows or partially matching rows, in 1 table or by comparing 2 tables, with or without first occurrences.

It works flawlessly on all operating systems and in all versions of Microsoft Excel 2019 - 2003.

How to get rid of duplicates in Excel with 2 mouse clicks

Assuming you have our Ultimate Suite installed in your Excel, perform these simple steps to eliminate duplicate rows or cells:

  1. Select any cell in the table that you want to dedupe, and click the Dedupe Table button on the Ablebits Data tab. Your entire table will get selected automatically.
    How do i remove duplicate records based on values in excel?
  2. The Dedupe Table dialog window will open, and all the columns will be selected by default. You pick Delete duplicates from the Select the action drop-down list and click OK. Done!
    How do i remove duplicate records based on values in excel?

As you can see in the following screenshot, all duplicates rows except 1st occurrences are deleted:

How do i remove duplicate records based on values in excel?

Tip. If you want to remove duplicate rows based on values in a key column, leave only that column(s) selected, and uncheck all other irrelevant columns.

And if you want to perform some other action, say, highlight duplicate rows without deleting them, or copy duplicate values to another location, select the corresponding option from the drop-down list:

How do i remove duplicate records based on values in excel?

If you want more options, such as deleting duplicate rows including first occurrences or finding unique values, then use the Duplicate Remover wizard that provides all these features. Below you will find full details and a step-by-step example.

How to find and delete duplicate values with or without 1st occurrences

Removing duplicates in Excel is a common operation. However, in each particular case, there can be a number of specificities. While the Dedupe Table tool focuses on speed, the Duplicate Remover offers a number of additional options to dedupe your Excel sheets exactly the way you want.

  1. Select any cell within the table where you want to delete duplicates, switch to the Ablebits Data tab, and click the Duplicate Remover button.
    How do i remove duplicate records based on values in excel?
  2. The Duplicate Remover wizard will run and the entire table will get selected.The add-in will also suggest creating a backup copy, and because you are going to permanently delete duplicates, we strongly advise that you check this box. Verify that the table has been selected correctly and click Next.
    How do i remove duplicate records based on values in excel?
  3. Select what records you want to find and remove. The following options are available to you:
    • Duplicates except 1st occurrences
    • Duplicates including 1st occurrences
    • Unique values
    • Unique values and 1st duplicate occurrences

    In this example, let's delete duplicate rows including 1st occurrences:

    How do i remove duplicate records based on values in excel?

  4. And now, select the columns to search for duplicates. Because our aim is to eliminate duplicate rows, be sure to select all the columns (which is usually done by default).
    How do i remove duplicate records based on values in excel?
  5. Finally, select the action you want to perform on dupes and click the Finish button. In this example, we expectedly choose the Delete duplicate values option.
    How do i remove duplicate records based on values in excel?

That's it! The Duplicate Remover add-in swiftly does its job and notifies you how many duplicate rows have been found and deleted:

How do i remove duplicate records based on values in excel?

That's how you can wipe duplicates off your Excel. I hope at least one of the solutions mentioned in this tutorial will work for you.

All of the powerful dedupe tools discussed above are included in our Ultimate Suite for Excel. If you are interested to give them a try, I encourage you to download a fully-functional trial version, and let us know your feedback in comments.

You may also be interested in

How do I remove duplicates in Excel based on cell value?

Remove duplicate values.
Select the range of cells that has duplicate values you want to remove. Tip: Remove any outlines or subtotals from your data before trying to remove duplicates..
Click Data > Remove Duplicates, and then Under Columns, check or uncheck the columns where you want to remove the duplicates. ... .
Click OK..

Is there an Excel formula to remove duplicates?

To begin with, select the range in which you want to ddelete dupes. To select the entire table, press Ctrl + A. Go to the Data tab > Data Tools group, and click the Remove Duplicates button. The Remove Duplicates dialog box will open, you select the columns to check for duplicates, and click OK.

How do I remove duplicates from multiple criteria in Excel?

Remove Duplicates from Multiple Columns in Excel.
Select the data..
Go to Data –> Data Tools –> Remove Duplicates..
In the Remove Duplicates dialog box: If your data has headers, make sure the 'My data has headers' option is checked. Select all the columns except the Date column..

How do I remove duplicate rows in power query based on conditions?

Keep or remove duplicate rows (Power Query).
To open a query, locate one previously loaded from the Power Query Editor, select a cell in the data, and then select Query > Edit. ... .
Select a column by clicking the column header. ... .
Select Home > Remove Rows > Remove Duplicates..