Skip to main content
 

How to combine two lists without duplicates in Excel?

Author: Sun Last Modified: 2024-07-30

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 two lists without duplicates sample data arrow combine two lists without duplicates result

Combine lists without duplicates with Remove Duplicates in Excel

Combine lists without duplicates with VBA

Combine lists without duplicates with Kutools for Excel


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:

combine two lists without duplicates sample data arrow combine two lists into one single column

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

turn on remove duplicates feature

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

set option in the remove duplicates dialog

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

remove duplicates message box

You can see the result:


remove duplicates 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()
'Updateby20140313
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
    Next
Next
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:

combine two list without duplicates with vba code 1

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

combine two list without duplicates with vba code 2

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

combine two list without duplicates with vba code result

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 > Select duplicates & unique cells. See screenshot:

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

combine two list without duplicates with kutools 1

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:

combine two list without duplicates with kutools 2

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

combine two list without duplicates with kutools result

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


Relative 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

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!