
📎 This article includes 1 downloadable practice file ↓
In Excel 365 one formula can return many results that “spill” into neighbouring cells. It changes how you build reports: no more copying formulas down, no helper columns, results that grow and shrink with the data.
In this article
Spilling and the # reference
Type =UNIQUE(B2:B200) in one cell: Excel fills as many cells below as needed and draws a blue border. Refer to the whole result with the spill operator: =COUNTA(D2#), =SORT(D2#).
FILTER
=FILTER(A2:F200, C2:C200="North") ' one condition
=FILTER(A2:F200, (C2:C200="North") * (F2:F200>50000)) ' AND: multiply
=FILTER(A2:F200, (C2:C200="North") + (C2:C200="East")) ' OR: add
=FILTER(A2:F200, C2:C200=H1, "No orders") ' message if none
SORT and SORTBY
=SORT(A2:F200, 6, -1) ' by column 6, largest first
=SORTBY(A2:A200, F2:F200, -1) ' sort names by another column
=TAKE(SORT(FILTER(A2:F200, C2:C200="North"), 6, -1), 5) ' top 5 North orders
UNIQUE
=UNIQUE(C2:C200) ' distinct values
=COUNTA(UNIQUE(C2:C200)) ' how many distinct
=UNIQUE(C2:C200, , TRUE) ' values that appear exactly once
=SORT(UNIQUE(FILTER(D2:D200, C2:C200="North"))) ' distinct North customers, A-Z
SEQUENCE and LET
=SEQUENCE(12, 1, DATE(2026,4,1), 0) ' twelve copies of a date (use EDATE for months)
=EDATE(DATE(2026,4,1), SEQUENCE(12, 1, 0)) ' Apr 2026 … Mar 2027
=LET(n, FILTER(F2:F200, C2:C200="North"), SUM(n) / COUNT(n))
LET names intermediate results so long formulas stay readable and calculate once.
#SPILL! errors
| Cause | Fix |
|---|---|
| Something in the spill range | Clear the cells (Excel highlights the area) |
| Formula inside an Excel Table | Tables can’t hold spills; put it next to the table |
| Whole-column references too big | Use exact ranges or Table columns |
Older Excel shows #NAME?: these functions need Excel 365 or 2021+.
Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.
📎 Practice files for this article
- 📗Dynamic arrays scenarios workbookFILTER, SORT, UNIQUE, SEQUENCE and LET with PASS/FAIL checks, a 'Try it' sheet with spilling formulas, and the two FILTER mistakes that break reports.⬇ XLSX · 10 KB
Free to use for learning. Files with macros (.bas) are plain text — import them with Alt+F11 → File → Import File, and always test on a copy.
Atul (AJ) builds office-automation and local-first AI tools as Atulya AI, and works with Excel, SAP and Oracle EPM every day. He writes about the shortcuts, macros and automations that actually save time — plus the occasional wacky fact. Videos on YouTube: Lazy Automator AI (@LazyAutomatorAI).
More posts by Atul →Stuck on a step? Ask a question and the AI answers using this article.