Home > Back-end >  Excel dynamic array formula does not spill
Excel dynamic array formula does not spill

Time:06-04

I have some data in an Excel sheet.

Some data in an Excel sheet in the range A1 to A7.

Is there a way to write a formula that's only in cell B1 (cells B2:B7 are blank), that will duplicate the values in A1:A7 to the range B1:B7, using Excel's "spilling" feature for functions that return arrays?

The same as the previous picture, but the data has been duplicated to the range B1 to B7.

My first idea was to use "=A1:A7", but that just copies the value from the formula's row in column A to the cell with the formula, without affecting the other cells.

The same Excel sheet. Cell B2 has the formula "=A1:A7" in it, and has the value of A2, with other cells unaffected.

CodePudding user response:

Use

=A1:A7

You will need to format the resulting cells as you want. Formula will not copy formatting and will not replace the existing formatting in the cells.

enter image description here


If your version does not have the dynamic array spill capabilities (Excel 2019 and older). Then one will need to array enter the formula or just drag a formula down.

To array enter we select a range the same size and shape as the target and put the above formula in the formula bar:

enter image description here

Then we confirm the formula with Ctrl-Shift-Enter and Excel will fill the formula down the range:

enter image description here

But this can also be done by putting =A1 in B1 and dragging it down. Older version require a formula in each cell that one expects an output. There is no "Spill" feature in older versions.

  • Related