Spreadsheet error
How to fix the #SPILL! error
TL;DR
#SPILL! means a dynamic array formula (FILTER, UNIQUE, SORT, SEQUENCE) wants to output multiple cells but something is in the way. Clear the output range.
What it means
Excel 365 supports dynamic arrays that "spill" into adjacent cells automatically. If those cells already have content, merged cells, or a table boundary, the formula returns #SPILL!.
Common causes
- •Cells below or to the right of the spill anchor already have values.
- •Spill range runs into a structured table.
- •Spill range includes merged cells.
- •Spill size is unknown and exceeds available space.
How to fix it
1.Clear the obstructing cells
- Hover the #SPILL! cell — Excel highlights the blocked range.
- Delete or move whatever content is in that range.
2.Unmerge cells
- Select the spill target area.
- Home > Merge & Center to unmerge.
3.Move out of the table
- Structured tables do not allow spill inside them.
- Move the dynamic array formula to a regular range, or convert table back to range.
Example
Broken
=UNIQUE(A2:A100) // returns #SPILL! because B3 has a leftover valueFixed=UNIQUE(A2:A100) // after clearing B3:B100UNIQUE needs to spill values downward. If any of the target cells are occupied, Excel refuses to overwrite them and returns #SPILL!.
Prevention
- Use dynamic arrays in dedicated spill areas — do not put other formulas next to them.
- Avoid merged cells in spreadsheets that use dynamic arrays.
Related errors
Let FormulaPad debug it for you
Paste your broken formula and the error message — get a diff and an explanation in seconds.
Debug a formula