Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I merge two excel file data (no changes made to the file)? Gem Excel Discussion (Misc queries) 1 January 29th 09 02:19 PM
linking data from text file on ftp server to excel file thread Excel Programming 1 September 26th 07 01:36 PM
ExtenXLS loads data into Excel 2002 file but damages the Excel file. [email protected] Excel Programming 1 April 28th 06 09:37 PM
Use ADO to transfer data from open excel file to closed excel file JCanyoneer Excel Programming 1 April 1st 05 07:41 AM
Open delimited text file to excel without changing data in that file zohanc Excel Programming 1 October 3rd 03 01:06 AM


All times are GMT +1. The time now is 02:37 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"