#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 66
Default VLOOKUP & INDIRECT

I read some other posts but I still can't get this to work...
in cell A1 is fred
in cell B1 is =VLOOKUP(A1,'C:\Documents and Settings\gy\My Documents\one
1.xls'!peeps,2)
where peeps is a named range - this WORKS FINE!
But what I really want to do is have the 'C:\Documents and Settings\gy\My
Documents\one 1.xls'!peeps in a cell, because I want to be able to change the
path using VBA (this is a test sheet, I need to look at last months data, and
the folders are of the format yymm mmm)

My expectation was that I shuld be able to have in cell C1
'C:\Documents and Settings\graham.yetton\My Documents\one 1.xls'!peeps
and in C2 =VLOOKUP(A1,INDIRECT(C1),2)
But it doesn't work

Can anyone tell ne why?
Please

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default VLOOKUP & INDIRECT

INDIRECT and a number of other functions do not work if they reference
closed, external workbooks. If you really need to use INDIRECT either plan
to have the external workbook opened or else have the data referenced by
INDIRECT on another worksheet within the same workbook.

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Graham Y" wrote:

I read some other posts but I still can't get this to work...
in cell A1 is fred
in cell B1 is =VLOOKUP(A1,'C:\Documents and Settings\gy\My Documents\one
1.xls'!peeps,2)
where peeps is a named range - this WORKS FINE!
But what I really want to do is have the 'C:\Documents and Settings\gy\My
Documents\one 1.xls'!peeps in a cell, because I want to be able to change the
path using VBA (this is a test sheet, I need to look at last months data, and
the folders are of the format yymm mmm)

My expectation was that I shuld be able to have in cell C1
'C:\Documents and Settings\graham.yetton\My Documents\one 1.xls'!peeps
and in C2 =VLOOKUP(A1,INDIRECT(C1),2)
But it doesn't work

Can anyone tell ne why?
Please

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 66
Default VLOOKUP & INDIRECT

Dave Thanks
The problem relates to using the same file name in different folders, which,
of course, XL won't let me open at the same time.
Looks like it'll be more VBA to grab the data.
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
Indirect/Vlookup/??? Light Excel Discussion (Misc queries) 2 October 5th 06 02:05 PM
vlookup with indirect Tonto Excel Discussion (Misc queries) 4 September 11th 06 11:00 PM
Indirect or Vlookup or what.... Jambruins Excel Discussion (Misc queries) 3 May 5th 06 07:48 PM
vlookup? indirect? streetboarder Excel Discussion (Misc queries) 4 April 19th 06 06:36 PM
Indirect Vlookup with RC[-1] outwest Excel Worksheet Functions 6 March 12th 06 10:08 PM


All times are GMT +1. The time now is 11:04 PM.

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"