Combine data from 2 worksheets using unique identifier

G

Guest

I want to combine the information in two worksheets into one, matching to an
ID number. For example, on one sheet I have name, ID, date of birth. On the
other I have ID, street address and salary. I want to combine the data into
one worksheet by matching the ID.
 
T

Terry Gregg

CathyW said:
I want to combine the information in two worksheets into one, matching to an
ID number. For example, on one sheet I have name, ID, date of birth. On the
other I have ID, street address and salary. I want to combine the data into
one worksheet by matching the ID.
You can do this by using the vlookup function provided the ID is unique
(ie not repeated in the sheet)
Assuming you had worksheet 1 set up as follows:
A B C
1 Name ID DOB
2 smith 1234 15/8/06

and Worksheet 2 as
A B C
1 ID Street Salary
2 1234 day st 55000

you would use the formula
=VLOOKUP(B2,[worksheet2]Sheet1!$A$1:$C$2,2,FALSE)in cell D2 of worksheet
1 and use =VLOOKUP(B2,[worksheet2]Sheet1!$A$1:$C$2,3,FALSE)in cell E2 to
bring in the data from Worksheet 2.

The range $A$1:$C$2 in the formula should reflect the total range of
your data in worksheet 2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top