#SPILL! Error in Excel: Causes, Fixes, and Prevention
The #SPILL! error means a dynamic array formula calculated a multi-cell result but Excel could not write it. Something is blocking the spill range.
1. What #SPILL! means
Dynamic array functions (Excel 365 / 2021+) — FILTER, UNIQUE, SORT, SEQUENCE, multi-column XLOOKUP, RANDARRAY, HSTACK, TOCOL — spill into neighboring empty cells. If any cell in the required output range is occupied, merged, or inside a Table, Excel shows #SPILL!.
2. Find blocking cells
- Select the #SPILL! cell
- Click the warning icon → Select Obstructing Cells when available
- Scan for values, spaces, formulas, merged cells, or Table borders in that rectangle
3. Top causes and fixes
Non-empty cells
Clear the spill corridor, or move UNIQUE/FILTER to a free column
Merged cells
Unmerge every cell in the spill rectangle (Home → Merge & Center → Unmerge).
Excel Tables
Dynamic arrays cannot spill inside a Table body. Move the formula outside the Table, or Convert to Range.
4. Worked examples
=FILTER(A2:D500,C2:C500="Open","No open rows")
=SORT(UNIQUE(A2:A1000))
=XLOOKUP(G2,A2:A100,B2:B100,"Not found") /* single column safer */
=SEQUENCE(12,1,1,1)
5. Prevention
- Reserve an empty output band for every spill formula
- Prefer one-column returns when multi-column spill is unnecessary
- Avoid merged cells in grids that host arrays
- Document spill corridors so colleagues do not type into them
6. Google Sheets
Same rule: keep the output area empty. FILTER, UNIQUE, SORT, SEQUENCE all need a clear corridor.
7. Related
Error directory · CSE arrays · XLOOKUP not found
ExcelFormulaAI · Nikhil Kappagantula