Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
h2olawrence
 
Posts: n/a
Default vlookup file specification

can i reference a file location in a separate cell for vlookup? i have a
whole column of numbers that come from different files, but they tend to move
around to different folders quite a bit. plus, if it works, i'd like to use
it as a template. however, i don't want to have to change every cell's
lookup. if i could just have the file location and name in a cell somewhere
and change that one spot instead of individual formulas, it'd be great. it
seems like something that should be so easy!
  #2   Report Post  
paul
 
Posts: n/a
Default

do you mean the target table of the vlookup would change folders all the
time??You could have a cell or formulas that recorded the filename or path
and filename of your worksheets but that would have to updated manually via
the edit- links menu.Even then i am not sure you could put those paths into
a vlookup...if you did that the links in the vlookup formulas could be kept
updated too....
--
hope this helps
Paul


"h2olawrence" wrote:

can i reference a file location in a separate cell for vlookup? i have a
whole column of numbers that come from different files, but they tend to move
around to different folders quite a bit. plus, if it works, i'd like to use
it as a template. however, i don't want to have to change every cell's
lookup. if i could just have the file location and name in a cell somewhere
and change that one spot instead of individual formulas, it'd be great. it
seems like something that should be so easy!

  #3   Report Post  
Ragdyer
 
Posts: n/a
Default

Try this, with lookup value in A1 and sheet name in A2:

=VLOOKUP(A1,INDIRECT(A2&"!A1:B15"),2,0)
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"h2olawrence" wrote in message
...
can i reference a file location in a separate cell for vlookup? i have a
whole column of numbers that come from different files, but they tend to

move
around to different folders quite a bit. plus, if it works, i'd like to

use
it as a template. however, i don't want to have to change every cell's
lookup. if i could just have the file location and name in a cell

somewhere
and change that one spot instead of individual formulas, it'd be great. it
seems like something that should be so easy!


  #4   Report Post  
Andy Wiggins
 
Posts: n/a
Default

Yes, but only if the file, you want to reference, is open.

This workbook demonstrates how to get data direct from an MS Access table,
or from an open or closed MS Excel workbook using the workbook function
SQL.REQUEST.
http://www.bygsoftware.com/examples/...SqlRequest.zip

It's in the "Excel with Access Databases" section on page:
http://www.bygsoftware.com/examples/examples.htm

Recently updated to show the use of SQL.REQUEST in the same workbook.

The code is open and commented.


--
Regards
-
Andy Wiggins FCCA
www.BygSoftware.com
Excel, Access and VBA Consultancy


"h2olawrence" wrote in message
...
can i reference a file location in a separate cell for vlookup? i have a
whole column of numbers that come from different files, but they tend to

move
around to different folders quite a bit. plus, if it works, i'd like to

use
it as a template. however, i don't want to have to change every cell's
lookup. if i could just have the file location and name in a cell

somewhere
and change that one spot instead of individual formulas, it'd be great. it
seems like something that should be so easy!



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
Locating a file in excel with a partial file name. Audra Excel Discussion (Misc queries) 0 February 19th 05 02:03 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
VLOOKUP from a file on another server Carole O Excel Worksheet Functions 2 January 14th 05 07:19 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
VLOOKUP not working Scott Excel Worksheet Functions 3 November 12th 04 08:06 PM


All times are GMT +1. The time now is 08:12 AM.

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

About Us

"It's about Microsoft Excel"