
The #SPILL! error in Excel appears when a formula wants to return several values but something blocks the cells where they should go. Dynamic array formulas such as UNIQUE, FILTER, SORT and SEQUENCE "spill" their results into the cells below and to the right. If those cells are not empty, or the area cannot hold a spill, Excel shows #SPILL! instead. This guide lists the common causes and the fix for each. Dynamic arrays are in Excel 365 and Excel 2021 or later. The sample data is made up.
What spilling means
When you type =UNIQUE(A2:A20) in one cell, Excel fills as many cells as the result needs. That filled area is the spill range, shown with a thin blue border when you select the formula. Only the first cell holds the formula. The rest show its results.
Find the cause
Click the cell with the error. A small warning icon appears. Click it and the first line says why, such as "Spill range isn't blank". Choose "Select Obstructing Cells" and Excel highlights what is in the way. This tells you which of the causes below applies.

Cause 1: cells in the way
This is the most common reason. Something sits inside the spill range, even a space or an empty looking text. Select the obstructing cells and press Delete, or move the formula to a clear area. A cell that looks empty may hold a space, so check with the Select Obstructing Cells option.
Cause 2: the formula is inside an Excel table
Spilled formulas do not work inside a table made with Ctrl+T. Move the formula to a cell outside the table, or convert the table to a range under Table Design, Convert to Range. A table column can still be used as the source of the formula.

Cause 3: merged cells
A spill range cannot contain merged cells. Unmerge them under Home, Merge and Center, or choose another area.
Cause 4: the spill is too big
If the result is larger than the room to the bottom or right of the sheet, the message says the spill range is too big. This can happen when you give a formula a full column such as A:A inside a function that returns one row per cell. Use a limited range like A2:A1000 instead.
Cause 5: the size is unknown
Some formulas, for example ones that use volatile functions such as RANDARRAY or OFFSET to set their own size, can return a result whose size Excel cannot work out. Rewrite the formula so the size is fixed, or use a different function.
Get one value instead of a spill
Sometimes you only want the first result. Wrap the formula in INDEX: =INDEX(UNIQUE(A2:A20), 1). In older shared files, a formula with the implicit intersection operator, which looks like @, also returns one value. Excel adds the @ sign to old formulas for you.

Use the spilled range in another formula
To refer to the whole spill, type the first cell followed by a hash sign. If the formula is in D2, then =COUNTA(D2#) counts the full result and updates as the list grows. This is a stable way to link other formulas to a result that changes in size. The functions that produce spills are covered in our guides to UNIQUE and FILTER.
Other errors that look similar
In Google Sheets the same problem shows as #REF! with the text "Array result was not expanded because it would overwrite data". The cause and the fix are the same: clear the cells in the way. Our SORT function guide mentions it.

A quick checklist
- Click the error icon and read the first line.
- Use Select Obstructing Cells.
- Clear or move whatever is in the way.
- Check for a table or merged cells.
- Limit the source range.
Questions and answers
Does #SPILL! mean my formula is wrong?
Not usually. The formula is fine. The place where the result should go is blocked.
Why does the error appear in older Excel?
Excel 2019 and older do not have dynamic arrays. They show #NAME? for functions such as UNIQUE and FILTER, not #SPILL!.
Can I stop a formula from spilling?
Wrap it in INDEX to return a single value, or use the @ sign for one value from a range.
Does deleting the obstructing cell remove the error at once?
Yes. Once the spill range is clear, Excel fills it as soon as the sheet recalculates.
