To Compare data between 2 excel sheets and copy data to the first sheet
I got excel data upto 58000 rows with 10 columns in two sheets t开发者_运维知识库o be compared.
Col A in both sheets has got few common names. if Sheet1, a10 = sheet2, a15, then i need to copy sheet2 b15, c16, etc to k10,l10 etc.
is there any way i can do it through vba?
thanks solomon
No need for VBA. Just use a VLOOKUP function. You can use something like the following in K2 on Sheet1.
=IFERROR(VLOOKUP($A2,Sheet2!$A$1:$J$58000,2,false),"")
And for L2:
=IFERROR(VLOOKUP($A2,Sheet2!$A$1:$J$58000,3,false),"")
etc.
精彩评论