Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
DD1
 
Posts: n/a
Default Vlookup - name of file to get info from is in Column A


I have a file with data in Column A only. For example, cell A1 contains
the word "Pathology", A2 contains the word "Pharmacy" etc. These names
are actual filenames. So I have a file called Pathology.xls and one
called Pharmacy.xls. I would like to write a vlookup to extract
information from these files, and put this information in Column B.

Is it possible to write a Vlookup which can be dragged down, so the
name of the file that it goes to get the information from is linked
directly to the name in Column A?

Within the Vlookup function - it's the second part of the formula,
after the first comma, that I want to link to Column A

I hope that makes sense.
Regards,
David


--
DD1
------------------------------------------------------------------------
DD1's Profile: http://www.excelforum.com/member.php...o&userid=25169
View this thread: http://www.excelforum.com/showthread...hreadid=394829

  #2   Report Post  
Biff
 
Posts: n/a
Default

Hi!

There is a way but it requires that the target file be open. That's a huge
disadvantage!

Still interested?

Biff

"DD1" wrote in message
...

I have a file with data in Column A only. For example, cell A1 contains
the word "Pathology", A2 contains the word "Pharmacy" etc. These names
are actual filenames. So I have a file called Pathology.xls and one
called Pharmacy.xls. I would like to write a vlookup to extract
information from these files, and put this information in Column B.

Is it possible to write a Vlookup which can be dragged down, so the
name of the file that it goes to get the information from is linked
directly to the name in Column A?

Within the Vlookup function - it's the second part of the formula,
after the first comma, that I want to link to Column A

I hope that makes sense.
Regards,
David


--
DD1
------------------------------------------------------------------------
DD1's Profile:
http://www.excelforum.com/member.php...o&userid=25169
View this thread: http://www.excelforum.com/showthread...hreadid=394829



  #3   Report Post  
DD1
 
Posts: n/a
Default


Yes - I don't think that's a big problem. I've got about 650 files in
total, but they are all in the same directory - and if it turns out
that memory is an issue, I can open 50 or so at a time. They are quite
small files.

Thankyou.


--
DD1
------------------------------------------------------------------------
DD1's Profile: http://www.excelforum.com/member.php...o&userid=25169
View this thread: http://www.excelforum.com/showthread...hreadid=394829

  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

As there are only 2 external workbooks you want to retrieve information of,
and both of them have fixed names, then there is a way to avoid the source
files to be opened. Simply in your file, to where you want to retrieve data,
create 2 hidden sheets which mirror needed info, and in your vlookup(s),
refer to those sheets. You can even use INDIRECT to get data from selected
file.

I.e. create sheets p.e. Pathology and Pharmacy.

On sheet Pathalogy, into cell A1 enter the formula (I assume needed
information in Pathology.xls is on sheet p.e. Data)
=IF('C:\My Documents\[Pathology.xls]Data'!A1="","",'C:\My
Documents\[Pathology.xls]Data'!A1)
and copy to range, big enough to include all data in source table. (when
there are columns not needed in lookup, you can delete them from mirror
sheet after that - to avoid the file to be bloated with abundant formulas)

Similarily mirror needed data from Pharmacy.xls on sheet Pharmacy.

Define mirrored tables on sheets Pathology and Pharmacy as Dynamic named
ranges Pathology and Pharmacy. (My advice is to hide both mirror sheets
after that.) Now you can have VLOOKUP formuals like
=VLOOKUP(A1,Pathology,2,0);
=VLOOKUP(A1,INDIRECT(Setup!$B$1),2,0)
where the entry in cell Setup!$B$1 is either "Pathology" or "Pharmacy";
=IF(Setup!$B$1="Pathology",VLOOKUP(A1,Pathology,2, 0),VLOOKUP(A1,Pharmacy,2,0));
etc.

--
Arvi Laanemets
( My real mail address: arvil<attarkon.ee )



"DD1" wrote in message
...

I have a file with data in Column A only. For example, cell A1 contains
the word "Pathology", A2 contains the word "Pharmacy" etc. These names
are actual filenames. So I have a file called Pathology.xls and one
called Pharmacy.xls. I would like to write a vlookup to extract
information from these files, and put this information in Column B.

Is it possible to write a Vlookup which can be dragged down, so the
name of the file that it goes to get the information from is linked
directly to the name in Column A?

Within the Vlookup function - it's the second part of the formula,
after the first comma, that I want to link to Column A

I hope that makes sense.
Regards,
David


--
DD1
------------------------------------------------------------------------
DD1's Profile:
http://www.excelforum.com/member.php...o&userid=25169
View this thread: http://www.excelforum.com/showthread...hreadid=394829



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 recover a file, with info, that I did'nt Save? JulianB Excel Worksheet Functions 1 March 8th 05 06:12 PM
How do I use vlookup to point to an external file that changes nam Aschaney Excel Worksheet Functions 3 January 20th 05 08:01 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
VLOOKUP from a file on another server Carole O Excel Worksheet Functions 2 January 14th 05 07:19 PM
File asks to update when no links were created Dave Links and Linking in Excel 1 December 16th 04 08:10 PM


All times are GMT +1. The time now is 09:39 PM.

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"