View Single Post
  #18   Report Post  
Rob Hick
 
Posts: n/a
Default

ahhh, that could possibly explain the problem then...

in my example above, if you make the change as Vasant suggests then in
cell B2 you simply get the text 'INDEX....' rather than the result of
evaluating the formula. if you make B1 a formula (put '=' infront)
then B2 returns the same value as B1 (dog), as you might expect.

if you now change the table above to include the ROW() function you
get:

A B
1 cat =INDEX(A1:A2,SUM(ROW())+1,0)
2 dog =INDIRECT("B1")

then B2 returns the same value again as B1 (cat) which again is
probably expected.

In my problem, the named formula contains a similarish function to that
in B1 above but unless I directly refer to the formula in a cell, the
ROW() part of the function cannot be evaluated. Thus when i try to use
the INDIRECT function to reference the name (rather than the name
evaluated in a cell) it returns #REF!

i was previously assuming (bad i know!) that the INDIRECT function
would evaluate the named formula in the context of the cell it was in
but this appears to be wrong.

does this make sense and does it explain the results i'm getting?