View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Agenor Agenor is offline
external usenet poster
 
Posts: 1
Default Returning an array from the INDEX function

I want to return a non-contiguous subset of another array using the INDEX
function. For example:

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

When selecting a 2x2 array of cells and hitting CTRL + SHIFT + ENTER, the
following array is returned:

[2 3
8 9]

However when using the formula "INDEX({1,2,3;4,5,6;7,8,9},{1;3},{2,3})" as
an input to another function (within the actual formula) it seems only the
top-left element is input i.e. (2).

For example:
ROWS(INDEX({1,2,3;4,5,6;7,8,9},{1;3},{2,3}))

returns 1.

As does,
COLUMNS(INDEX({1,2,3;4,5,6;7,8,9},{1;3},{2,3}))

Does anyone have any idea how to allow Excel to actually pass the entire
array into the function rather than just the first element?