Fix #SPILL! in Excel: Clear the Blocked Range
What a #SPILL! error means, the usual blockers of a spill range, and how to clear them for FILTER, UNIQUE or a multi-column lookup.

A #SPILL! error means a dynamic-array formula such as FILTER or UNIQUE has more results than it can place, because something sits in the cells where they should go. The fix is to clear or move whatever blocks the spill range. Paste the formula into the Excel Formula Debugger and pick #SPILL! to see the likely cause, then check the cells below and to the right of the formula.
What #SPILL! means
In Excel 365 and Google Sheets, a formula that returns several values writes them into the cells below it, to the right, or both. This is called spilling. The formula sits in one cell, and its results fill a block of cells called the spill range. Excel needs that whole block to be empty.
When any cell in the block is not empty, Excel shows #SPILL! in the formula cell and does not write any results. Nothing is wrong with the formula itself. The place for the results is taken, so the fix is in the sheet.
Dynamic-array functions such as FILTER, UNIQUE, SORT and XLOOKUP with a wide return range are not available in Excel 2019. There, the error shown is #NAME?, not #SPILL!.
Blocked spill ranges
The debugger rules include blocked spill ranges. These are the usual blockers:
- A value, a formula or an old result in a cell that lies in the path of the results.
- A cell that looks empty but holds a space or a formula that returns an empty text.
- Merged cells in the spill range.
- A formula inside an Excel table. Tables do not allow spilled results, so move the formula outside the table.
- A result that would run past the edge of the sheet.
In Excel, select the cell that shows #SPILL! and open the warning icon next to it. It offers the option Select Obstructing Cells, which highlights the blockers. Clear them or move the formula to a free area, and the results appear.
Steps with the debugger
- Open the Excel Formula Debugger.
- Paste the formula, for example
=FILTER(A2:C100,C2:C100>100). - Pick #SPILL! as the error.
- Read the Likely causes.

For this formula the blocked spill range is listed. The tool sees only the formula you paste, not your cells, so it cannot tell you which cell blocks the range. Use the Select Obstructing Cells option in Excel for that.
The debugger also offers a report that you can download, which is useful if you want to pass the diagnosis to a colleague or attach it to a ticket.

After you clear the range, check that the results are correct. A FILTER with no matching rows returns #CALC! instead of an empty range, so a different message does not mean the spill is still blocked.
Lookups that return several columns
A lookup can also spill without your noticing. A VLOOKUP that asks for several columns, such as =VLOOKUP(F2,A2:D100,{3,4},FALSE), returns two values and spills to the right in Excel 365 and Google Sheets. An XLOOKUP with a wider return range, for example C2:D100, does the same.
If the cell to the right of the formula already holds data, the result is #SPILL!. Clear that cell or ask for one column only. The XLOOKUP vs INDEX-MATCH Generator adds a note that several result columns spill, so you know when it applies.

For a single value, the older style avoids spilling altogether. See XLOOKUP vs INDEX/MATCH: Which One to Use for the differences, and Lookup Formulas for Excel 2019 Without XLOOKUP if your file must also work in older versions. To write a new dynamic-array formula with warnings for your version, use the Excel Formula Generator.
If a different error appears once the spill works, for example #VALUE! in a dependent cell, see Fix #VALUE! in Excel When the Cells Look Fine.
Microsoft documents the error and the behaviour in How to correct a #SPILL! error and Dynamic array formulas and spilled array behavior.
Check your own file
Open the Excel Formula Debugger, paste the formula that shows #SPILL! and pick #SPILL!. Then select the cell in Excel, choose Select Obstructing Cells and clear what it highlights.