Comparing two excel sheets

Closed
kish1975 Posts 12 Registration date Wednesday March 3, 2010 Status Member Last seen March 22, 2010 - Mar 4, 2010 at 02:32 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 4, 2010 at 05:36 AM
Hi,

Macro given by you is working, Thankyou very much . But if I have two columns in worksheet1 and 1 column in worksheet2, I should get only required columns in worksheet3 with column names. for example

worksheet1

x y z
abc 10 a
pqr 20 b
zyx 30 c

worksheet2

x
abc
xyz
zyx
rst
tyu

output :

x z
abc a
zyx c

Requesting to sort out the problem ASAP
Related:

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Mar 4, 2010 at 05:36 AM
in sheet 2 cell to the right of abc (that is in B2 ) copy paste this formula

=VLOOKUP(Sheet2!A2,Sheet1!$A$1:$C$4,3,0)

copy B2 down to any cell in column B of sheet 2.
0