BigBuilder
New Member
I'm trying, (unsuccessfully), to use the Indirect formula to dynamically change spreadsheets in my workbook.
My 'starter for 10' formula was:
VLOOKUP(INDIRECT("'",&C2&"'!"&$G$17&"'",&C2&"'!$G$14:$AO$607"),2,FALSE)
where C2 =
Patient Data - Latest
G17 = NUFFIELD HEALTH, THE GROSVENOR HOSPITAL, CHESTER in another worksheet, (Patient Data - Latest).
So, the whole thing should end up looking like:
VLOOKUP('Patient Data - Latest'!$G17,'Patient Data - Latest'!$G14:$AO$607,2,false)
which does work in it's 'raw' form and brings back 27.
I'm getting a #REF! when I try and replicate it using the INDIRECT and I've no idea why.
I've tried to 'fool' the INDIRECT by concatenating the spreadsheet reference bit of the VLOOKUP together in another cell then referencing it in the INDIRECT:
CONCATENATE("'",C2,"'!$G17",B13,"'",C2,"'!$G$14:$AO$607")
So, I'd end up with:
=VLOOKUP(INDIRECT(B12),2,FALSE) where B12 is where the concatenate is.
It didn't like that either.
I've looked on a few websites and I can't see anything wrong with what I've done.
I've also used INDIRECT before in another workbook - without a problem so I'm really puzzled.
Thanks for any responses. If more info's required, please let me know.
My 'starter for 10' formula was:
VLOOKUP(INDIRECT("'",&C2&"'!"&$G$17&"'",&C2&"'!$G$14:$AO$607"),2,FALSE)
where C2 =
Patient Data - Latest
G17 = NUFFIELD HEALTH, THE GROSVENOR HOSPITAL, CHESTER in another worksheet, (Patient Data - Latest).
So, the whole thing should end up looking like:
VLOOKUP('Patient Data - Latest'!$G17,'Patient Data - Latest'!$G14:$AO$607,2,false)
which does work in it's 'raw' form and brings back 27.
I'm getting a #REF! when I try and replicate it using the INDIRECT and I've no idea why.
I've tried to 'fool' the INDIRECT by concatenating the spreadsheet reference bit of the VLOOKUP together in another cell then referencing it in the INDIRECT:
CONCATENATE("'",C2,"'!$G17",B13,"'",C2,"'!$G$14:$AO$607")
So, I'd end up with:
=VLOOKUP(INDIRECT(B12),2,FALSE) where B12 is where the concatenate is.
It didn't like that either.
I've looked on a few websites and I can't see anything wrong with what I've done.
I've also used INDIRECT before in another workbook - without a problem so I'm really puzzled.
Thanks for any responses. If more info's required, please let me know.