...
...
So I setup the Address function instead of the Cell function and its
almost working.
My function looks like this:
=INDIRECT(CONCATENATE(SheetName,"!",ADDRESS(ROW(BA7:BA25),
COLUMN(BA7:BD7))))
and it does not work as an array at this point.
Mind telling us how this doesn't work? Does Excel prevent you from entering
this? Does Excel allow entry but return error values? If so, what error values?
Or does it return something else, not error values but also not what you
expected?
I can setup an array with the nested Concatenate function:
=CONCATENATE(SheetName,"!",ADDRESS(ROW(BA7:BA25), COLUMN(BA7:BD7)))
this function works fine as an array but as soon as I nest it, it
doesn't work anymore.
Does anyone know if I am doing something wrong?
What you're doing wrong is not providing complete details of how this isn't
working. So I'm going to guess. First, if your worksheet names contain spaces,
they need to be enclosed in single quotes. Always best to use single quotes
regardless. So change one [also replacing the pointless CONCATENATE function
with the work-alike but much better concatenate operator, &, and making both ROW
and COLUMN refer to EXACTLY the same range],
=INDIRECT("'"&SheetName&"'!"&ADDRESS(ROW(BA7:BD25),COLUMN(BA7:BD25))))
But this still won't work because the result is an array of range references,
which is something Excel can't resolve as the final result to be stored in a
range. So change two (and I realize this seems nonsensical given what's been
written before in this thread),
=CELL("Contents",INDIRECT("'"&SheetName&"'!"&ADDRESS(ROW(BA7:BD25),
COLUMN(BA7:BD25)))))
Wrapping an array of range references inside CELL("Contents",...) converts it to
an array of the values of the top-left cells in each of the ranges in the array,
which is something Excel *CAN* handle as range values.
It's these completely opaque semantic shenanigans that make Excel so much fun to
use. If it did things sensibly, it'd be so much duller.