View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
tracktraining tracktraining is offline
external usenet poster
 
Posts: 68
Default getting data from two excel file

thanks for the vlookup hint.
--
Learning


"Michael Arch" wrote:

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.




"tracktraining" wrote:

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.
--
Learning