I can make a reference to a cell (or a range) in a different file by using its adress, for example, typing in a cell:
='c:\directory\filename.xls'!nameOfTheRange
It doesn't matter if the file is open or not.
But I made a function to reference a range in a different file by its adress and name of the range, like this:
=myFunction(adress,nameOfTheRange)
The function myFunction concatenates the strings to build the complete adress of the range.
If the file (the referenced file with the named range) is open, the function works perfectly, but it doesn't work if the file is closed.
What's the difference? How can I make a reference (in a function) to a closed file?
='c:\directory\filename.xls'!nameOfTheRange
It doesn't matter if the file is open or not.
But I made a function to reference a range in a different file by its adress and name of the range, like this:
=myFunction(adress,nameOfTheRange)
The function myFunction concatenates the strings to build the complete adress of the range.
If the file (the referenced file with the named range) is open, the function works perfectly, but it doesn't work if the file is closed.
What's the difference? How can I make a reference (in a function) to a closed file?