Excel: how to merge data from 2 workbooks with 1 col. in common?

G

Guest

I've got two separate workbooks. Each workbook contains unique columns except
for one, which is a "key" column, or an id field.
Example: I have a client # column in both workbooks. In the first workbook,
I also have first name and last name columns. In the second column, I have
phone number and address columns. How do I merge the two workbooks into one
so that for each client # I have their first name, last name, phone number,
and address.
 
G

Guest

Well, I think I'd start by getting all the data into one workbook. With both
workbooks open, select the worksheet with the phone number and address then
click Edit>Move or Copy Sheet. Select the target book under 'To Book' and
select it's required destination under 'Before Sheet' Check the 'Create a
copy' checkbox then click OK

Once the data is all in one place you can copy the require columns to where
ever you want them
 
G

Guest

Use VLOOKUP

I assume second worksheet has ColA: ID #, ColB: Phone #, ColC: Address

Sort the second worksheet by ID number and name a range covering A1 to last
row in C as 'data'.

In the first worksheet D1 enter
=VLOOKUP(A1,Sheet2!data,2,false) - this will return the phone number if ID
is present.

In E1 enter
=VLOOKUP(A1,Sheet2!data,3,false) - this will retun the address if ID is
present.

Copy D1 and E1 down all rows - job done.

HTH
 

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