Comparing two excel sheets

Closed
kish1975 Posts 12 Registration date Wednesday 3 March 2010 Status Member Last seen 22 March 2010 - 4 Mar 2010 à 02:32
venkat1926 Posts 1863 Registration date Sunday 14 June 2009 Status Contributor Last seen 7 August 2021 - 4 Mar 2010 à 05:36
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 14 June 2009 Status Contributor Last seen 7 August 2021 811
4 Mar 2010 à 05:36
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.