Log in
x
or
x
x
Register
x

or
0
0
0
s2sdefault

How to remove all duplicates but keep only one in Excel?

This tutorial introduces the tricks to remove all duplicate values from a list but keep only one in Excel, read the details:

Remove all duplicates but keep only one with Remove Duplicates function

Remove all duplicates but keep only one with VBA

Remove all duplicates but keep only one with Kutools for Excel good idea3

Combine all duplicate rows and keep data with Kutools for Excel good idea3


Compare Ranges utility (can compare two ranges, and select and color the same values or different values.)

doc compare range


In Excel, the Remove Duplicate feature can help you remove all but keep one duplicate value.

1. Select the data list you need, and click Data > Remove Duplicates. See screenshot:

doc remove duplicate keep one 1

2. Then in Remove Duplicates dialog, check the column name that you want to remove duplicates from, and if your data has header, check My data has headers option, too. See screenshot:

doc remove duplicate keep one 2

3. Click OK. And a dialog pops out to tell you how many duplicates have been removed, just close it. And now all duplicates have been remove but keep only one in the list.

doc remove duplicate keep one 3


If you are interested in VBA, here I also can introduce a VBA code to solve this task.

1. Press Alt +F11 keys simultaneously to open Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste below VBA to the new Module window.

VBA: Remove all duplicates but keep one.

Sub RemoveAllDeplicateButOne()
    Dim LR As Long: LR = Range("A" & Rows.Count).End(xlUp).Row
    ActiveSheet.Range("A1:A" & LR).RemoveDuplicates Columns:=1, Header:=Name
End Sub

3. Press F5 key or click Run to execute the VBA, and the duplicates in list in column A have been removed but keep one.

Tip: In the above VBA, A indicates the column A, and A1: A indicates the list range, you can change them as you need.

formula Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group
as auto text, and liberate your brain!       Know About Auto Text     Get Free Trial

There is a powerful utility in Kutools for Excel named Select Duplicate & Unique Cells can quickly select or highlight all duplicates except first one, and then you can remove them.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.
Go to Download
Free Trial 60 daysPurchase
PayPal / MyCommerce

After free installing Kutools for Excel, please do as below:

1. Select the data range and click Kutools > Select > Select Duplicate & Unique Cells. See screenshot:

doc remove dulicate keep one 15

2. In the displayed dialog, check Duplicates (Except 1st one) option, and click Ok. See screenshot:

doc remove duplicate keep one 5

3. Then a dialog pops out to remind you the number of selected cells. And just click OK to close it. See screenshot:

doc remove duplicate keep one 6

4. And all the duplicates but first one are selected, press Delete key to clear them.

doc remove duplicate keep one 7

Tip: You also can remove all duplicates but keep one with Select Duplicate & Unique Cells like this:

Select all the unique values including the first duplicates, and then copy them by pressing Ctrl + C and paste to another location by Ctrl + V.

doc remove duplicate keep one 8doc remove duplicate keep one 9

If you have some data, and what you want is to combine the duplicate rows then keep the corresponding data as below screenshot shown, you can use Kutools for Excel’s Advanced Combine Rows function.

doc remove duplicate keep one 10

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Excel, please do as below:

1. Select the data and click Kutools > Content > Advanced Combine Rows. See screenshot:

doc remove dulicate keep one 16

2. In the Combine Rows Based on Column dialog, select the column you want to remove duplicate from and click Primary Key to make it as the primary key column. See screenshot:

doc remove duplicate keep one 12

3. Then select the column you just want to keep the data and then click Combine, and select one delimiter form the list. See screenshot:

doc remove duplicate keep one 13

4. Click Ok, and the duplicate rows are combine and keep the corresponding data.

doc remove duplicate keep one 14


Relative Articles:


Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.