Note: The other languages of the website are Google-translated. Back to English
English English

How to combine two lists without duplicates in Excel?

There are two lists in your worksheet, and some of values in the lists are duplicates, and you want to combine these two lists and just leave the unique values, as shown as the below screenshots, how can you do?

Combine lists without duplicates with Remove Duplicates in Excel

Combine lists without duplicates with VBA

Combine lists without duplicates with Kutools for Excel

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Combine lists without duplicates with Remove Duplicates in Excel

To combine two lists and remove duplicate values in Excel, you can do as follow:

1. Copy one of the two lists and paste it to the bottom of the other list, see screenshot:

2. Select the list and click Data > Remove Duplicates, see screenshot:

3. In the Remove Duplicates dialog, if your column has no header, uncheck My data has headers, and then click OK. See screenshot:

4. Then a dialog displays on the screen to tell you the duplicates have been delete, click OK. See screenshot:

You can see the result:

arrow blue right bubble Combine lists without duplicates with VBA

In Excel, a VBA also can help you combine the two lists without duplicates.

1. Hold ALT button and press F11 on the keyboard to open a Microsoft Visual Basic for Application window.

2. Click Insert > Module, and copy the VBA into the module.

VBA: Combine lists without duplicates

Sub FindUniques()
Dim rng As Range
Dim InputRng As Range, OutRng As Range
xTitleId = "KutoolsforExcel"
Set InputRng = Application.Selection
Set InputRng = Application.InputBox("Range :", xTitleId, InputRng.Address, Type:=8)
Set OutRng = Application.InputBox("Out put to (single cell):", xTitleId, Type:=8)
Set dic = CreateObject("Scripting.Dictionary")
For j = 1 To InputRng.Columns.Count
    For i = 1 To InputRng.Rows.Count
        xValue = InputRng.Cells(i, j).Value
        If xValue <> "" And Not dic.Exists(xValue) Then
            OutRng.Value = xValue
            dic(xValue) = ""
            Set OutRng = OutRng.Offset(1, 0)
        End If
End Sub


3. Click Run button or press F5 to run the VBA.

4. A dialog displayed on the screen, and you can select the range you want to combine. See screenshot:

5. Click OK, then another dialog popped up for you to select a cell to output the combined result. See screenshot:

6. Click OK. You can see the lists have been combined.

Tip: The result cannot reserve the cells formatting after running the above VBA.

arrow blue right bubble Combine lists without duplicates with Kutools for Excel

With installed Kutools for Excel, you can use the Select duplicates & unique cells function to solve the problem that combine two list without duplicates.

Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Get it Now

1. Copy one of the two lists and paste it to the bottom of the other list, select the new list, then click Kutools > Select Tools > Select duplicates & unique cells. See screenshot:

2. In the Select duplicates & unique cells dialog, check All uniques (Including 1st duplicates), click Ok.

3. Then a dialog pops up to tell you how many unique values have been selected, click OK and Cancel to close two dialogs. See screenshot:

4. And copy the selected unique values and paste them to a new column. See screenshot:

Click here to know more about Select duplicates & unique cells.

Relative Articles:

Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations