roelandwatteeuw
Board Regular
- Joined
- Feb 20, 2015
- Messages
- 89
- Office Version
- 365
- Platform
- Windows
Hi all
Hope you can help me with this one:
I have a list A with data.
List A:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Street A
[/TD]
[TD]123.4
[/TD]
[TD]Marc
[/TD]
[TD]OK
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD]Problem
[/TD]
[/TR]
</tbody>[/TABLE]
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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Street C
[/TD]
[TD]89.1
[/TD]
[TD]Frank
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD]Problem
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Street C
[/TD]
[TD]89.1
[/TD]
[TD]Frank
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
What would be the best way to do this?
VBA-code?
Thank you!
Roeland
Hope you can help me with this one:
I have a list A with data.
List A:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Street A
[/TD]
[TD]123.4
[/TD]
[TD]Marc
[/TD]
[TD]OK
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD]Problem
[/TD]
[/TR]
</tbody>[/TABLE]
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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Street C
[/TD]
[TD]89.1
[/TD]
[TD]Frank
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
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:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID-nr
[/TD]
[TD]Address
[/TD]
[TD]Meters
[/TD]
[TD]User
[/TD]
[TD]Comment
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]Street B
[/TD]
[TD]56.7
[/TD]
[TD]Rob
[/TD]
[TD]Problem
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]Street C
[/TD]
[TD]89.1
[/TD]
[TD]Frank
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
What would be the best way to do this?
VBA-code?
Thank you!
Roeland