Thread: Array Functions
View Single Post
  #10   Report Post  
Harlan Grove
 
Posts: n/a
Default

Alan Beban wrote...
Harlan Grove wrote:
INDEX has odd semantics in array formulas. Unlike OFFSET, INDEX will
only return arrays when either its first or second argument is zero.

....
I haven't taken the trouble to understand exactly what the OP is doing
with the original formula (it seemed to work for me in a simple test
when array entered), but the above statement is clearly incorrect. E.g.,

....

It's incorrect in part. INDEX does have odd array semantics, but it
does work when it's the outermost function call and is called with
array second or third arguments. However, evaluating
=INDEX({1,4,7;2,5,8;3,6,9},2,{1,2}) in the formula bar (pressing [F9]
with all or none of the formula selected) returns just 2 rather than
{2,5}.

This isn't the source of the OP's trouble, but it's still something to
be avoided. Enter in any cell

=SUM(INDEX({1,4,7;2,5,8;3,6,9},2,{1,2}))

It returns 2 whether entered normally or as an array formula. Select a
2 column by one row range and enter this formula as an array formula,
and it'll return {2,5} rather than {7,7}. Enter

=SUMPRODUCT(INDEX({1,4,7;2,5,8;3,6,9},2,{1,2}))

in a single cell, and it returns 2 whether entered normally or as an
array formula. Select a 2 column by one row range and enter this
formula as an array formula, and it'll return {7,7}.