Deepak
Deepak

Reputation: 473

How to match the cell values and copy them from different sheets

I need to match Column A values in Sheet 1 with Column A values in Sheet 2. If both are same then Copy B and C values from Sheet 2, and paste in Sheet 1 in D and E. I will enter values manually in sheet 2 in B and C.

I used the formula below. But not working. Because most of the COlumn A values are not in order. Either a VBA Code or EXCEL formula will be really helpful.

=IF(Sheet4!A2=Sheet5!A2;Sheet5!B2;" ")

=INDEX((Sheet5!A:A);MATCH(Sheet5!B2;(Sheet4!A:A);0))

Upvotes: 0

Views: 66

Answers (1)

MarcinSzaleniec
MarcinSzaleniec

Reputation: 2256

use INDEX-MATCH like that:

=INDEX(Sheet2!$C:$D, MATCH(Sheet1!$A2, Sheet2!$A:$A, 0), COLUMNS($A:A)) in sheet1!D2 and drag it down and right. 

BTW, why have you tagged it with vba?

Upvotes: 1

Related Questions