Merge data from 2 Excel worksheets

  • Thread starter Thread starter rhatala
  • Start date Start date
R

rhatala

OS Win Xp SP2, Excel 2004 SP1
I have 2 different types of excel spreadsheets, a company spreadsheet
and a contact spreadsheet.
The company database has an address field and the contact database
does not.

I'd like to compare both databases on the company field and add the
address elements of Address, city, state and zip to the contact
database.

I am not a programmer, but can follow an example or directions to do
this.

TIA
Bob
 
Hi

you don't actually need to use code for this, the VLOOKUP function can be
used instead

assume the company sheet is set up as follows
.........A.............B....................C..........D..........E
1....Company...Address.........City....State......Zip
2....ABC.........15 North Rd...Perth...WA......6000

and the contact one is set up as follows
.........A.............B..............C..........D..........E..........F
1....Company...Contact...Address...City......State.....Zip
2....ABC...........Fred....................................................

the formula for contact sheet C2 would be
=VLOOKUP(A2,Company!$A$2:$E$1000,2,0)

the formula for contact sheet D2 would be
=VLOOKUP(A2,Company!$A$2:$C$1000,3,0)
the formula for contact sheet E2 would be
=VLOOKUP(A2,Company!$A$2:$E$1000,4,0)
the formula for contact sheet F2 would be
=VLOOKUP(A2,Company!$A$2:$C$1000,5,0)


you could then select these cells and fill down (select the cells and
then move your mouse over the bottom right hand corner of F2 and when you
see a + double click)

Hope this helps
Cheers
JulieD
 

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

Back
Top