Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
dh
 
Posts: n/a
Default 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?
  #2   Report Post  
Max
 
Posts: n/a
Default

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?



  #3   Report Post  
dh
 
Posts: n/a
Default

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?




  #4   Report Post  
Max
 
Posts: n/a
Default

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



  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

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.



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
Create a pdf with web links from file created in excel [email protected] Excel Discussion (Misc queries) 0 February 3rd 05 09:11 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Updating Automatic links doesn't work with arrays Mats Samson Excel Discussion (Misc queries) 0 December 18th 04 03:17 PM
File asks to update when no links were created Dave Links and Linking in Excel 1 December 16th 04 08:10 PM
Automatic update of links in destination file when source file mo. Brucgil Excel Discussion (Misc queries) 0 December 2nd 04 04:07 PM


All times are GMT +1. The time now is 10:28 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"