Combine 2 lists to 1 unique list

roelandwatteeuw

Board Regular
Joined
Feb 20, 2015
Messages
87
Office Version
  1. 365
Platform
  1. Windows
Hi all

Hope you can help me with this one:

I have a list A with data.

List A:
ID-nr
Address
Meters
User
Comment
1
Street A
123.4
Marc
OK
2
Street B
56.7
Rob
Problem

<tbody>
</tbody>

Now I got a new list B with more data. They have the same columns, same data, only the column 'Comment' will be blank. BUT: Not all the lines from list A will be in list B and the other way around.

I paste these lines under the lines from list A.

List B:
ID-nr
Address
Meters
User
Comment
2
Street B
56.7
Rob
3
Street C
89.1
Frank

<tbody>
</tbody>


I need to combine these two lists to one unique list.

Conditions:
1. All the lines (ID-nr) from list A that are not in list B, need to be deleted in list A
2. All the lines from list B that are in list A, need to be deleted in list B

The results should be:

Result:
ID-nr
Address
Meters
User
Comment
2
Street B
56.7
Rob
Problem
3
Street C
89.1
Frank

<tbody>
</tbody>


What would be the best way to do this?

VBA-code?

Thank you!
Roeland
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
I would do the following

(1) put the lists together where list A has the column labels and list B is directly beneath list A without any labels
(2) select the entire list (it doesn't matter if you select the labels or not)
(3) go to the data tab
(4) click remove duplicates and unselect all of the columns except the ID-nr
(5) press ok
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,088
Messages
6,128,744
Members
449,466
Latest member
Peter Juhnke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top