Forum Discussion
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!!
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
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.
- michelle_sc98Copper Contributor
IngeborgHawighorst This worked perfectly. Thank you!
Hi, Michelle! You can apply a VLOOKUP formula in sheet A, referring to the range in sheet B that has all the information.
Please check these videos and see if they help.
https://www.youtube.com/watch?v=E7gQ-PgYkMc
https://www.youtube.com/watch?v=hwL6KKJP-_I
https://www.youtube.com/watch?v=-hJxIMBbmZY
I hope this helps!
Good luck. ;-)