Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Variable in an external lookup formula 1

Status
Not open for further replies.

marcr62

IS-IT--Management
Oct 21, 2002
14
US
I have an exteranl lookup formula that brings data in a summay spreadsheet from various other spreadsheets. An example formula is: ='[daily Bookings 2003.xls]Wk 8'!$N$19.

My question is,"Is it possible to have the 8 in this formula be a variable that is set on the summary document each week? What I mean is, that this summary sheet is run each week and the next run will be looking for Wk 9, not Wk 8 as above. It does not work, but what I would like to do is: ='[daily Bookings 2003.xls](variable)'!$N$19 where variable is actually =D9 on the summary sheet. Each week I will make D9 equal that weeks number.
 
Thanks for responding,

Where in the ='[daily Bookings 2003.xls]Wk 8'!$N$19 does the &indriect("E1") go.

I replaced the WK 8 with &indirect("E1") and a dialog box comes up asking me to pick a sheet name from the daily bookings 2003.xls.
 
And in E1, did you put something like Wk 8?

I would try getting rid of spaces in the sheetnames, for one.

and I THINK (help somebody!), it would be:

='[daily Bookings 2003.xls]indirect("E1")'!$N$19

where the contents of E1 contain your worksheet name Anne Troy
Word and Excel Macros
Coming soon: wX
 
It's more like:
Indirect("'[daily Bookings 2003.xls]"&E1&"'!$N$19")

I would suggest naming cell E1 and then the formula would become:
Indirect("'[daily Bookings 2003.xls]"&myname&"'!$N$19")
 
Thanks Everyone,

That worked great.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top