Abalan Musk
Abalan Musk

Reputation: 57

copy row values from one sheet to another sheet for the matched records in Excel

I have two sheets in an excel workbook and Sheet1 has the following columns:

Sheet1

and Sheet 2 has only ID column:

Sheet2

If ID in sheet 2 matches with ID in sheet 1 I want to write col1 and col2 values in sheet1 to sheet 2

enter image description here

I used VLOOK up to identify the matched records but I am manually copying the values of the matched records into sheet 2 and I have to do this for 100,000 rows. I really appreciate if I can get some help.

Upvotes: 0

Views: 103

Answers (1)

JvdV
JvdV

Reputation: 75840

In your sheet 2, in cel B2 write this formula: =IFERROR(INDEX(Sheet1!$A$1:$C$4,MATCH(Sheet2!A2,Sheet1!A:A,0),2),"")

In your sheet 2, in cel C2 write this formula: =IFERROR(INDEX(Sheet1!$A$1:$C$4,MATCH(Sheet2!A2,Sheet1!A:A,0),3),"")

Change matrix offcourse to your needs and drag down!

Upvotes: 1

Related Questions