← Error directory

#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!.

Key: The formula cell is fine. The problem is almost always below or to the right.

2. Find blocking cells

  1. Select the #SPILL! cell
  2. Click the warning icon → Select Obstructing Cells when available
  3. 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

Quick fix: clear obstructing cells → unmerge → move outside Tables → F9.

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