3.3 Dynamic arrays and spill formulas
Checked against Microsoft's Excel for Windows keyboard references, August 2026
What you'll be able to do
Write one formula that returns a whole list — filtered, sorted, with duplicates removed — and that resizes itself when the data changes. No more columns of helper formulas.
Before you start
Open the pivot sales workbook. Its sales Table feeds every example. These functions need a current Microsoft 365 Excel.
The work
- Same either way: see spilling once. In an empty cell type
=SORT(UNIQUE(Sales[Store]))and press Enter. The result flows into as many cells as it needs, and that area is called the spill range. You wrote one formula, and the cells below it hold nothing at all. Delete the top cell and the whole list goes. - Same either way: refer to a whole spill with the hash sign. If the list starts in E2, then
=COUNTA(E2#)counts it, andE2#in any formula means the entire spill, whatever size it is right now. A dropdown list built onE2#grows by itself. - Same either way: learn the verbs, one at a time.
=FILTER(Sales, Sales[Store]="Hyderabad")returns the matching rows.=SORT(range, 2, -1)orders by the second column, largest first.=SORTBY(names, amounts, -1)orders one list by another.=UNIQUE(range)removes duplicates.=SEQUENCE(12)makes the numbers 1 to 12, which is useful for dates and row numbers. - Same either way: put them inside one another and read them aloud from the inside out.
=SORT(FILTER(Sales[Amount], Sales[Store]="Hyderabad"), 1, -1)says "Hyderabad's amounts, largest first". Each function hands its result to the next one. - Same either way: give FILTER its empty answer.
=FILTER(range, condition, "none found")says what to show when nothing matches. Without that third part, no matches shows as #CALC!. - Same either way: #SPILL! means the result has nowhere to land. Something is sitting in the cells it needs: a stray value, a merged cell, or a Table, because a spill cannot land inside a Table. Click the warning symbol beside the error and choose Select Obstructing Cells. Clear what is in the way and the result appears.
- Same either way: here is the habit that pays. Next time you reach for a helper column — first extract, then remove duplicates, then sort — write one combined formula instead. There is one cell to audit, nothing to fill down, and the result resizes with the data.
Try it
Build each of these in one cell. The store list in alphabetical order. Every Hyderabad sale, largest first, with an honest empty answer. The top month by total, using SORTBY over a summarised pair. A SEQUENCE of 1 to 12. Then break one on purpose by typing into the cells it needs, and repair the #SPILL!.
Check yourself
What is a spill range, and what is actually in its lower cells?
The area one formula's result flows into. Nothing is in the lower cells. Only the top cell holds a formula, and the rest show its output and empty when it is deleted.
What does E2# mean, and why does it beat E2:E20?
The whole spill starting at E2, at its current size. A fixed range goes stale the moment the list grows or shrinks. The hash sign never does.
#SPILL! appeared. What happened, and what is the fix?
The result needs cells that are not free, because a value, a merged cell or a Table is in the way. Clear it or move it, and the error's own menu will select it for you.
FILTER found nothing and the cell shows #CALC!. What was missed?
The third part, for the empty case: =FILTER(range, condition, "none found") states it honestly instead of showing an error.
Go deeper
We haven't checked most of these for screen reader use yet.
Back to Dynamic arrays and spill formulas: work through the checklist