Sub topic 1
What Changed with Dynamic Arrays
Prerequisites
This chapter assumes you can enter Excel formulas, use cell and range references such as A1:A10, and understand relative and absolute references. You should also know basic functions such as SUM and IF, and have Excel for Microsoft 365 or Excel 2021 or later.
What Changed with Dynamic Arrays
Before dynamic arrays, most formulas returned one value per cell. To calculate several results, you often copied a formula down or entered a legacy array formula across a selected range.
Dynamic arrays let one formula return an array, which is an ordered set of values. Excel places those values in neighboring cells automatically. This is called spilling.
The formula is stored only in the first cell. Excel recalculates the whole result when the source data changes.
Formulas That Work on Whole Ranges
Many formulas can now process ranges directly. For example, if B2:B6 contains quantities and C2:C6 contains prices, enter this formula in D2:
=B2:B6*C2:C6Excel returns one product for each row and spills five results. You do not need to copy the formula to D3:D6.
Functions can also generate or transform arrays:
=SEQUENCE(5)This returns the numbers 1 through 5. FILTER, SORT, SORTBY, and UNIQUE also return arrays that can spill.
How a Formula Spills into Neighboring Cells
The cell containing the formula is the anchor cell. The cells occupied by its complete result form the spill range.
Spilling requires the destination cells to be empty. A value, formula, merged cell, or other obstruction produces #SPILL!. Select the anchor cell and use Excel’s error information to identify the blocked area.
The Anchor Cell and the Spill Range
The anchor cell owns the result. To refer to the complete current spill range, append # to the anchor reference:
=SUM(A1#)If A1 contains =SEQUENCE(5), A1# means all five output cells. If the result later grows or shrinks, the reference updates automatically.
Exercise
What is the difference between the anchor cell and a spill range?
Show answer
The anchor cell contains the formula. The spill range includes the anchor cell and every neighboring cell filled by its result.