Skip to main content

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

Author: Sun Last Modified: 2024-09-26

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


Remove all duplicates but keep only one with Remove Duplicates function

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:

Remove Duplicates button on the Data tab on the ribbon

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:

Remove Duplicates dialog

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.

Success dialog


Remove all duplicates but keep only one with VBA

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.


Remove all duplicates but keep only one with Kutools for Excel

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 offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

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:

Select Duplicate & Unique Cells option on the Kutools tab on the ribbon

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

Select Duplicate & Unique Cells dialog

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

Success dialog

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

All the duplicates but first one are selected

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.

Select Duplicate & Unique Cells dialog with All unique option checked9

Demo: Remove All Duplicates But Keep Only One

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Combine all duplicate rows and keep data with Kutools for Excel

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.

Illustration of combining duplicate rows and keep the corresponding data

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

1. Select the data and click Kutools > Merge & Split > Advanced Combine Rows. See screenshot:

Advanced Combine Rows option on the Kutools tab on the ribbon

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:

Combine Rows Based on Column dialog with Primary Key button highlighted

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:

Combine Rows Based on Column dialog with Combine button highlighted

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

Duplicate rows are combined and the corresponding data are kept

Demo: Combine Duplicates But Keep Adjacent Data

Kutools for Excel: Over 300 handy tools at your fingertips! Enjoy permanently free AI features! Download Now!

Related Articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!