ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   getting data from two excel file (https://www.excelbanter.com/excel-programming/425259-getting-data-two-excel-file.html)

tracktraining

getting data from two excel file
 
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

Michael Arch

getting data from two excel file
 
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


tracktraining

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



All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com