Loop thru cells and find match
Hello,
I have a small task I need to work on, but have not done vba in a while and
was wondering if someone could help on this.
I have 2 sets of data that I need to compare to each other.
First set: Second set:
A B D E
A1 123.56 A1 123.56
A2 124.58 B4 111.11
A3 129.32 B4 132.45
B4 132.45
So, I need to check the vals of cell D(x) against A(x) and see if there is a
match. If so, then I also need to verify if cell E(x) matches the equivalent
B(x) cell (in same row) where the match for D(x) is. If so, then I need to
have range D(x):E(x) pasted into new cols G(x):H(x), if not, then it would be
blank in that row.
My end result should be:
First set: Second set: Result set:
A B D E G H
A1 123.56 A1 123.56 A1 123.56
A2 124.58 B4 111.11 BLANK
A3 129.32 B4 132.45 B4 132.45
B4 132.45 BLANK
How can I achieve this via code?
Thank you in advance for your help and attention.
Consuelo :-)
|