Reference a Spill Range with the # Operator

Excel Formulas › Dynamic Arrays

Excel 365Excel 2021+

When a formula spills, the # operator lets you refer to the whole result — however big it grows — with one reference. Point a chart, a drop-down, or another formula at A2# and it tracks the spill automatically.


Quick formula: if a spilling formula lives in A2, reference its entire output as:
=SUM(A2#)
A2# means “the whole spill range anchored at A2.” It resizes with the spill, so dependent formulas never break.

Functions used (tap for the full reference guide):

The example

A2 holds a spilling list; A2# refers to all of it at once.

ACD
1=SORT(...)FormulaResult
2East=COUNTA(A2#)4
3North=SUM(B2#)
4South
5West

The formula

Count everything the spill produced, however long:

=COUNTA(A2#) // counts the whole spill anchored at A2

How it works

The # turns a single anchor into the full range:

  1. A dynamic-array formula in A2 spills down (and/or across) into a range.
  2. Writing A2# — the anchor cell plus # — references that entire spilled range, whatever its current size.
  3. If the spill grows from 4 items to 40, A2# automatically covers all 40 — no editing the range.
  4. Use it anywhere a range goes: SUM(A2#), a chart source, or a Data Validation list (=$A$2#) for a self-sizing drop-down.

Self-updating drop-down: put =SORT(UNIQUE(range)) in A2, then set Data Validation → List → Source to =$A$2#. The drop-down grows and shrinks with the data — no fixed range to maintain.

Try it: interactive demo

Live demo

Change how many items the formula in A2 spills; A2# tracks it.

items
=COUNTA(A2#) =

Variations

Sum or count a spill

Aggregate the whole output:

=SUM(B2#)

Self-sizing drop-down

Data Validation list source:

=$A$2#

Chain off a spill

Filter the spilled result further:

=FILTER(A2#, A2#<>"East")

Pitfalls & errors

#REF! if the anchor isn’t a spill. A2# only works when A2 actually spills. On a normal single-value cell it errors.

The # follows the anchor. Reference the top-left cell of the spill (where the formula lives), not a cell in the middle of the output.

Excel 365/2021 only. The spill operator doesn’t exist in Excel 2019 and earlier.

Practice workbook

📊
Download the free Reference a Spill Range with the # Operator practice workbook
A spilling list with live COUNTA/SUM/FILTER off the # reference and a self-sizing drop-down, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

What does the # symbol do in Excel formulas?
The # (spill) operator references an entire spilled range from its anchor cell. If a dynamic-array formula is in A2, then A2# refers to its whole output and resizes automatically. Requires Excel 365/2021.
How do I make a drop-down that grows automatically?
Put =SORT(UNIQUE(range)) in a cell like A2, then set Data Validation List source to =$A$2#. The spill reference keeps the list in sync with the data.
Why does my A2# reference return #REF!?
A2 isn't actually spilling, or you referenced a cell that isn't the spill's top-left anchor. Point # at the cell containing the dynamic-array formula.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Unique sorted list · Create a drop-down list · Filter data with a formula

Function references: SORT · UNIQUE