Forum Discussion

michelle_sc98's avatar
michelle_sc98
Copper Contributor
May 09, 2019
Solved

Copying data between worksheets

I've got two separate worksheets that have different sets of data. The first column on each sheet is an ID number column, which is the only commonality between the two. Worksheet A contains all possible ID numbers and Worksheet B contains a subset of Worksheet A. I need to copy all rows with data in Worksheet B into Worksheet A and match those rows based on ID number. How would I do this?

 

In my example, I need to copy the number in the Host column in Worksheet B over to corresponding Donor ID row in Worksheet A.

 

Thanks for any guidance!!

 

  • michelle_sc98 

     

    Try this formula in cell B2 of Worksheet A, then copy the formula down. 

     

    =IFERROR(VLOOKUP(A2,'Worksheet B'!A:B,2,FALSE),"")

     

    In words: find the value from A2 in the list in columns A:B of worksheet B, when found, return the value from the 2nd column (column B). If no match is found Vlookup will return an error. If an error is encountered, the formula returns a blank cell.

     

     

3 Replies

Resources