Removing Duplicates in Excel

Post date: 17-Jan-2011 06:36:55

Ref: http://www.mrexcel.com/tip138.shtml

 

Method 1: Use the Unique Option in Advanced Filter

Excel will provide you a unique list of customers in column D.

Method 2: Use a Formula to Determine if This Record is Unique

The COUNTIF function can count how many records above the current record match the current record. The trick to making this work is to use a single dollar sign in the reference. If you are entering a formula in C2 and you reference A$1:A1, this is saying, "Start from the absolute reference of A1 and go down to the record above the current record". When you copy this formula down, the first A$1 will stay the same. The second A1 will change. In Row 17, the formula in C2 will read: =COUNTIF(A$1:A16,A17)=0.

Once you have entered the formula in C2 and copied it down to all rows, you should copy C2:C15 and then use Edit - Paste Special Values to convert the formulas to values. You can now sort descending by column C and the unique values will be at the top of the list. Method 3: Use a Pivot Table to get Unique Customers

A pivot table is great at finding unique values. This is the fastest way in Excel 2000-2003.

Excel will show you a unique list of customers.

Method 4: New in Excel 2007 - Use Conditional Formatting to Mark Duplicates

Excel 2007 offers new methods for finding duplicates. Select the range of customers. From the Home ribbon, choose Conditional Formatting - Highlight Cells Rules - Duplicate Values and click OK.

If a name is found twice, Excel will highlight both occurences of the name. You would then want to sort all of the highlighted cells to the top.

Method 5: New in Excel 2007 - Use Remove Duplicates icon

This method is highly destructive! Make a copy of your dataset before you do this!

Excel will delete records from your dataset. It will report that n duplicates were removed and nn records remain.

As you can see, there are many methods for dealing with duplicates. Excel 2007 adds two new tools to your arsenal.