Dynamic Array Formula

There are two ways to “dynamic array formula”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: in Microsoft 365 just type the formula and press Enter — it spills automatically; in older versions the same formula needs Ctrl+Shift+Enter, which is what the surrounding braces mean.

Annotated stepsExcel
1

Write the formula against whole ranges rather than single cells.

2

On Microsoft 365 press Enter — a multi-value result spills into the cells below or beside it.

3

On Excel 2019 and earlier press Ctrl+Shift+Enter, and never type the braces yourself.

4

To refer to a whole spilled range elsewhere, use the top-left cell followed by # — D2#.

5

On #SPILL!, click the warning triangle: it names the obstruction, then clear those cells.

6

To edit a legacy CSE array you must select its whole block; Excel refuses to change part of one.

=SUM(B2:B100*C2:C100)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

An array formula operates on whole ranges at once instead of a cell at a time. =SUM(B2:B100*C2:C100) multiplies each pair and totals the results in one step, with no helper column. The history matters because it explains almost every problem people hit: before Microsoft 365, such a formula had to be committed with Ctrl+Shift+Enter, and Excel showed it wrapped in braces {…} that you must never type yourself. Microsoft 365 replaced that with dynamic arrays: a formula returning several values simply SPILLS into the neighbouring cells, marked by a blue border, and the top-left cell is referenced elsewhere as B2# with a hash. The spill is also the source of the #SPILL! error, which means exactly one thing — something is in the way of the range the formula wants to fill. Clear the obstructing cells and it resolves. Old CSE formulas keep working in 365, and legacy files opened in 365 keep their braces. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “dynamic array formula”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected formula change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a workflow that saves repeating the same clicks every week useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

Quantities in B2:B100 and unit prices in C2:C100, and you want the order total without a line-total column. =SUM(B2:B100*C2:C100) — press Enter on Microsoft 365, or Ctrl+Shift+Enter on Excel 2016, where it appears as {=SUM(B2:B100*C2:C100)}. On 365, =SORT(UNIQUE(A2:A500)) typed into one cell spills the whole distinct sorted list down the column; referring to it elsewhere as D2# keeps up as the list grows or shrinks. Dynamic arrays removed the single most confusing keystroke in Excel, and knowing which era a formula came from explains most of what looks broken about it. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “dynamic array formula”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

Common mistakes

  • Typing the braces by hand — that makes it text, not an array formula.
  • Pressing Enter on a pre-365 array formula, which usually returns just the first value with no error.
  • Applying an array formula to entire columns (B:B*C:C) and calculating a million rows for a hundred of data.
  • Treating #SPILL! as a formula error; it means the output range is blocked, nothing more.
  • Inserting a row inside a spill range and being surprised the result moves — the range belongs to the formula, not to the cells.

Frequently asked questions

What is an array formula?

One that works on whole ranges at once rather than a single cell, such as =SUM(B2:B100*C2:C100), which pairs up the values and totals the products with no helper column.

Do I still need Ctrl+Shift+Enter?

Not in Microsoft 365, where array formulas spill on plain Enter. In Excel 2019 and earlier, yes — the braces Excel shows are the sign it was committed that way.

What does #SPILL! mean?

The formula wants to fill a range that is not empty. Click the warning triangle to see what is in the way, clear it, and the result appears.

What does the # after a cell reference mean?

It refers to the whole spilled range starting at that cell — D2# is every cell the formula in D2 produced, however many that turns out to be.