Search code examples
arraysexcelexcel-formula

EXCEL: Array in a cell. How to get the array back?


Let's say I have in B2 the formula =ROW(A1:A3). This formula gives an array of {1;2;3}. Because a cell only holds one value, cell B2 displays a value of 1. Any place in the worksheet, the formula =B2 gives 1, not the array. Yet, Excel still remembers the array because the formula is still in B2.

Is there any way to get the array back so it, the whole array, not its individual elements, can be used for further manipulation? I'm looking for something like OPERATION(B2) = {1;2;3}. For example, SUMPRODUCT(OPERATION(B2)) = SUMPRODUCT(ROW(A1:A3)) = 6.

enter image description here


Solution

  • As a workaround, you can store your formula in Name Manager, e.g.:

    enter image description here

    Then you can use it as a reference in Excel formulas, like =INDEX(Rows,2,1):

    enter image description here