Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I merge two excel file data (no changes made to the file)? | Excel Discussion (Misc queries) | |||
linking data from text file on ftp server to excel file | Excel Programming | |||
ExtenXLS loads data into Excel 2002 file but damages the Excel file. | Excel Programming | |||
Use ADO to transfer data from open excel file to closed excel file | Excel Programming | |||
Open delimited text file to excel without changing data in that file | Excel Programming |