getting data from two excel file

T

tracktraining

Hi All,

This is going to be a difficult question for me to ask so please bear with
me while i try to explain.

I have two excel file, one is named Animal.xls and the other one is
Service.xls. There are several common columns between the two files. My code
is being written in the Animal.xls file, but I want to obtain some
information from the Service.xls file. Column B (animal number) is the same
in both file. From the Animal.xls, I would like to know if animal number 123,
234, 345, and so on has their shot (which can be obtained from column E of
Service.xls). I would like to copy the answer (in Service.xls) corresponding
to the animal number into the Animal.xls.

example:

Animal.xls
A (animal name) B (animal #) C (location)
Dog - John 1234 livermore, ca
Turtle - Joe 7891 hayward, ca

Service.xls
A (client name) B (animal #) C (shot)
Larry 1234 y
Adam 7891 n
Tina 4567 y

so the code should have the following end result:

Animal.xls
A (animal name) B (animal #) C (location) D (shot)
Dog - John 1234 livermore, ca y
Turtle - Joe 7891 hayward, ca n

Please help with any suggestion!

Thank you.
tracktraining.
 
M

Michael Arch

You can use vlookup:
In your Animal.xls on column D you can place a formula similar to the one
below:
=vlookup(A1,Service.xls!b1:c200,2,false)
tweek it to correct.
 
T

tracktraining

thanks for the vlookup hint.
--
Learning


Michael Arch said:
You can use vlookup:
In your Animal.xls on column D you can place a formula similar to the one
below:
=vlookup(A1,Service.xls!b1:c200,2,false)
tweek it to correct.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.
 

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