This is pretty complex, but I'll do my best to explain it as clearly as possible. Please let me know if it doesn't make sense.
I have two workbooks--an input and an output. They have to be separate because of the way the system works, i.e. a 'nominator' does all the inputting into a simple input workbook and the output workbook formats it ready for use. In order for this to work, the output workbook has to refer to the input workbook to retrieve values.
I have been testing this with both workbooks being open.
To achieve this, I make use of nested INDIRECT
functions; the first one creates the file path, calling upon a named range, and the second one tells Excel to interpret that file path and retrieve the value.
I start off by using INDIRECT
to build a filepath:
=INDIRECT("input_sheet_location")&"Wk 25 2012'!$B$11"
This returns something like:
\\My Documents\Subfolder\[input_sheet.xlsx]Wk 25 2012'!$B$11
And then nest it in another in order to get Excel to read that path:
=INDIRECT("'"&INDIRECT("input_sheet_location")&"Wk 25 2012'!$B$12")
This successfully returns the value of cell B12 from the input_sheet_location--a named range, which is a file directory. For argument's sake we can say it returns:
Captain America's underpants
So the above works perfectly well. For me. However, on another user's machine, it doesn't function. I have tried to dig in, and worked out the following:
- The connection between the files is present on their systems too--exploring Data>Edit Links shows they have the same, working connection as I do.
- The file path produced is the same; I built a macro to show it to the user, and on 3 machines, it's come out the same every time.
- Most crucially (and confusingly), the non-nested
INDIRECT
formula does work. It is only the nested formula which only works on my computer. On every other user's computer, it returns a#REF
error.
Does anyone have any idea why this might be the case? I am at a loss.
Thanks for reading that spiel.