![]() |
file links - arrays???
I think there should be a function in excel for what I am tring to do. 20
years ago when I took a little cousre in BASIC we use to call them an array. Here is what I am tring to do, its like linking to files but I only what to set up the fumula 1 time. Say I have 2 file - call them file 1 and file 2 - am working on file 2 - I what a formula like this =((x)sheet1!A1) and =((x)Sheet1!A2) where x is = to C:\file 1.xls I only want it ienter the "link file", "array" or "x" one time so that it is easy to change file name in the formula but you don't have to change the whole formula. Does any of this make sense? Is this possible? |
Provided the file is open, think you could use INDIRECT
Something like in say, B1: =INDIRECT("'["&A1&"]Sheet1'!A1") where you have the filename in A1: file 1.xls The above will return the same as having in B1: =[file 1.xls]Sheet1!A1 If file 1.xls is closed, you'll get #REF! error in B1 The error will disappear once you open file 1.xls -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- "dh" wrote in message ... I think there should be a function in excel for what I am tring to do. 20 years ago when I took a little cousre in BASIC we use to call them an array. Here is what I am tring to do, its like linking to files but I only what to set up the fumula 1 time. Say I have 2 file - call them file 1 and file 2 - am working on file 2 - I what a formula like this =((x)sheet1!A1) and =((x)Sheet1!A2) where x is = to C:\file 1.xls I only want it ienter the "link file", "array" or "x" one time so that it is easy to change file name in the formula but you don't have to change the whole formula. Does any of this make sense? Is this possible? |
well that does work but is there any wat to do this without opening the
files. I am tring to collect data from many files and the pieces that I need all reside in the same places on each file "Max" wrote: Provided the file is open, think you could use INDIRECT Something like in say, B1: =INDIRECT("'["&A1&"]Sheet1'!A1") where you have the filename in A1: file 1.xls The above will return the same as having in B1: =[file 1.xls]Sheet1!A1 If file 1.xls is closed, you'll get #REF! error in B1 The error will disappear once you open file 1.xls -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- "dh" wrote in message ... I think there should be a function in excel for what I am tring to do. 20 years ago when I took a little cousre in BASIC we use to call them an array. Here is what I am tring to do, its like linking to files but I only what to set up the fumula 1 time. Say I have 2 file - call them file 1 and file 2 - am working on file 2 - I what a formula like this =((x)sheet1!A1) and =((x)Sheet1!A2) where x is = to C:\file 1.xls I only want it ienter the "link file", "array" or "x" one time so that it is easy to change file name in the formula but you don't have to change the whole formula. Does any of this make sense? Is this possible? |
Try this previous post by Harlan:
http://tinyurl.com/cqeos -- Rgds Max xl 97 --- GMT+8, 1° 22' N 103° 45' E xdemechanik <atyahoo<dotcom ---- "dh" wrote in message ... well that does work but is there any wat to do this without opening the files. I am tring to collect data from many files and the pieces that I need all reside in the same places on each file |
Max wrote...
Try this previous post by Harlan: http://tinyurl.com/cqeos .... Maybe, but I think option 1 in http://groups-beta.google.com/group/...443753560f0075 (or http://makeashorterlink.com/?F2993260A ) may suit the OP better. |
All times are GMT +1. The time now is 11:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com