ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Trying to access different files depening on a variable (https://www.excelbanter.com/excel-discussion-misc-queries/81848-trying-access-different-files-depening-variable.html)

Priorsyeat

Trying to access different files depening on a variable
 
I am trying to access other excel files depending on a variable in my current
worksheet
ie ='["Plan 200"&q5-1&" 200"&q5&".xls"]Main'!P36 such that when q5 is 6 then
the expression will be
='[Plan 2005 2006.xls]Main'!P36

Bob Phillips

Trying to access different files depening on a variable
 
=INDIRECT("'["Plan 200"&q5-1&" 200"&q5&".xls"]Main'!P36")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Priorsyeat" wrote in message
...
I am trying to access other excel files depending on a variable in my

current
worksheet
ie ='["Plan 200"&q5-1&" 200"&q5&".xls"]Main'!P36 such that when q5 is 6

then
the expression will be
='[Plan 2005 2006.xls]Main'!P36





All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com