A dynamic array formula such as FILTER, SORT or UNIQUE writes its results into neighbouring cells, spilling down or across from the formula cell. If any of those cells already holds a value, even a stray space or a number, Excel stops with #SPILL! and shows no results at all. An AI-written formula can be perfectly correct and still fail this way. Check the spill range before rewriting the formula.
What you need
- The AI-written dynamic array formula and the cell it sits in
- The cells below and beside it, where the results should spill
- A count of how many results the formula should return
Step 1: Read the error and find the blocked cell
Click the cell showing #SPILL! and read the error. Select the formula cell, then look for the dashed border that marks the spill range; the blocked cell inside that border is usually highlighted. Check each cell in the range for a value, a formula, or a stray space.
Step 2: Clear the blocking cells
Delete the value in the blocked cell, or move it somewhere outside the spill range. If the block is a merged cell, unmerge it, because a spilled result cannot land inside a merged range.
Step 3: Re-check the spilled results
After clearing the block, the results should appear without changing the formula. Count the returned rows and check the first and last against the source data.
Worked example: synthetic filtered region list
The table below is a synthetic example. It shows the expected result of checking an AI-written FILTER formula; no formula was run.
| Check | Value | Result |
|---|---|---|
| Formula used | =FILTER(A2:A9,B2:B9=”East”) | Six East rows expected |
| Error shown | #SPILL! | Blocked spill range |
| Blocked cell | B4 | Holds a stray note |
| Result after clearing B4 | 6 rows | Matches the source |
Expected result (UNTESTED). the FILTER formula shows #SPILL! while B4 holds a stray note inside the spill range; clearing B4 lets six East rows spill, matching the source. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- A spill range that reaches the edge of the sheet also returns #SPILL!, because there is no room for the results.
- A formula that returns a single value never spills, so #SPILL! points at the output size, not the formula logic.
- Tables do not accept spilled results inside them; place a dynamic array formula outside the table.
- Merged cells inside the spill range always block the spill, even when they look empty.
