Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50090

Compare two columns from diff excel sheets and delete all non matching rows

$
0
0
Hi,

I am new to this forum. I need help in writing a macro to compare two columns from different excel sheets and delete non matching rows. The catch here is one sheet has multiple entries of another sheet column data.

Please help!

scenario shown below.

Sheet A

A B
1 x
2 y
3 z

Sheet B

A B C D
1 x m1 m2
1 x n1 n2
4 g h1 h2
4 g j1 j2
2 y t1 t2
3 z s1 s2
5 r q1 q2


After macro :

Sheet B

A B C D
1 x m1 m2
1 x n1 n2
2 y t1 t2
3 z s1 s2

Viewing all articles
Browse latest Browse all 50090

Trending Articles