What Does #SPILL Mean in Excel? Causes and Fixes
By Dr. Zubair Khalid, DVM, MS, PhD ·

What does #SPILL mean in Excel? It means a dynamic array formula tried to return several values at once, but one or more cells in the range it needed were already occupied. Excel blocks the whole result and shows #SPILL! in the cell where you typed the formula. The fix is almost always to clear the blocking cells or shrink the range the formula returns.
Quick Answer
#SPILL!appears when a formula returns an array of values but cannot write them all into the grid.- The most common cause is existing data, text, or a formula sitting inside the spill range.
- Excel shows the error only in the top-left cell of the intended range. The rest of the range stays empty.
- Click the error icon next to the cell to see the blocked range highlighted, then delete or move what is in the way.
- If the range is genuinely too large, wrap the formula so it returns fewer values, or move the formula to a cell with free space below and to the right.
What #SPILL Means
A spill is the automatic overflow of a single formula result into neighboring cells. When you write a formula that returns more than one value, Excel writes the first value in the cell you typed it in and "spills" the remaining values into the cells below or to the right. The whole block of cells is called the spill range.
The precise definition: a spill range is the rectangular region that a dynamic array formula occupies, anchored at the formula cell and extending as far as the returned array requires. The anchor cell holds the formula. The other cells in the range hold the spilled values and cannot be edited individually.
#SPILL! is the error Excel returns when that rectangular region overlaps a cell that is not empty. Excel will not overwrite your existing content, so it refuses to write any of the array and reports the conflict instead.
This behavior is part of Excel's dynamic array engine. Older versions of Excel did not spill at all. They either returned a single value or required you to select a range and enter the formula with a special keystroke. If you open a workbook in a version without dynamic arrays, spilled formulas may appear wrapped in braces or return only the first value.
How It Works
The mechanism is simple. A formula returns an array with a certain number of rows and columns. Excel checks whether every cell from the anchor cell through that shape is empty. If all are empty, the values spill. If any cell is occupied, Excel returns #SPILL! in the anchor cell.
For a formula returning $m$ rows and $n$ columns, the spill range is:
$$ \text{Spill range} = \text{anchor cell} : \text{anchor cell offset by } (m-1, n-1) $$
Each symbol means the following.
- Anchor cell: the cell where you typed the formula. It always shows either the first value or the error.
- $m$: the number of rows the returned array has.
- $n$: the number of columns the returned array has.
- Offset by $(m-1, n-1)$: the bottom-right corner of the range, counted from the anchor.
A single-cell result has $m = 1$ and $n = 1$, so the range is just the anchor cell. Nothing can block it, which is why ordinary formulas never produce #SPILL!. The error only appears when $m > 1$ or $n > 1$.
You can see the intended range without guessing. When a cell shows #SPILL!, a thin dashed border appears around the range Excel wanted to fill. Clicking the warning icon next to the cell offers options to select the blocking cells or to select the spill range.
Worked Example
This sheet holds five student scores in column B. Column C is meant to hold a Pass or Fail result for each student, produced by one formula in C2.
| A | B | C | |
|---|---|---|---|
| 1 | Student | Score | Result |
| 2 | Ana | 78 | =IF(B2:B6>=70,"Pass","Fail") -> displays #SPILL! |
| 3 | Ben | 65 | Blocked |
| 4 | Cara | 91 | |
| 5 | Dan | 54 | |
| 6 | Eve | 88 |
The intended setup is a single dynamic array formula in C2 that tests the whole range at once:
=IF(B2:B6>=70,"Pass","Fail")
Because the condition B2:B6>=70 returns five TRUE or FALSE values, the IF returns five text values. Excel needs to write them into C2:C6. That is a 5-row, 1-column array, so $m = 5$ and $n = 1$, and the spill range is C2:C6.
C3 already contains the text "Blocked". The spill range C2:C6 is therefore obstructed, and Excel returns #SPILL! in C2. The formula is correct. The grid is the problem.
Delete the text in C3 and the formula immediately fills C2 through C6 with Pass, Fail, Pass, Fail, Pass for Ana, Ben, Cara, Dan, and Eve.
How to Interpret It
Read #SPILL! as a placement error, not a calculation error. Excel is telling you the answer exists but has nowhere to go. That distinction matters because the fix is usually about the worksheet layout, not about the formula logic.
Check three things in order.
- Is the anchor cell itself merged? A merged cell cannot host a spill range.
- What is inside the dashed border? Any text, number, or formula there blocks the spill.
- Is the range larger than you expected? A formula referencing a whole column can return far more rows than you intended.
If the values that appear after you clear the blockage are correct, the formula was fine all along. If they are wrong, you have a separate logic problem to solve.
When to Use It (and when not to)
Spilling is the right approach when one formula should produce a column or block of related results. Examples include testing a list of values against a threshold, extracting unique items from a column, sorting a range, or generating a sequence of dates. One formula is easier to audit and edit than a hundred copied ones.
Avoid relying on spill ranges when the output area must stay stable. If you plan to type notes, add headers, or paste data into the cells below the formula, the spill will break. In shared workbooks where other people edit freely, a spilled formula is fragile because anyone can drop a value into its range.
Also avoid spilling into a region you intend to sort or filter independently. The spilled cells move as a unit, and you cannot edit one of them on its own.
#SPILL vs #VALUE
Both are Excel errors, but they point at different problems. #SPILL! is about space. #VALUE! is about data types or argument shapes that the function cannot process.
| Feature | #SPILL! | #VALUE! |
|---|---|---|
| Cause | Spill range is blocked or too large | Wrong data type or bad argument |
| Location | Anchor cell only | The cell with the faulty formula |
| Fix | Clear or resize the spill range | Correct the data or the formula |
| Formula logic | Usually correct | Usually incorrect |
| Related to arrays | Always | Sometimes |
If you see #SPILL!, do not rewrite the formula first. Clear the obstruction and recheck.
Common Mistakes
- Typing over a spilled cell. Excel accepts the entry without a warning, and the whole array collapses to
#SPILL!. Fix: undo, then edit the anchor formula instead of the spilled cells. - Leaving a stray space or apostrophe in the range. A cell that looks empty may hold a space character. Fix: select the range and delete the contents, or use Find and Replace to remove spaces.
- Referencing a whole column.
=A:Astyle references can demand more rows than exist below the formula. Fix: reference the exact range, such asA2:A100. - Merged cells in the spill range. Merged cells cannot receive spilled values. Fix: unmerge the cells in the range.
- Assuming the formula is broken. Many people rewrite a correct formula. Fix: click the error icon and choose Select Obstructing Cells to see the real problem.
- Forgetting that tables behave differently. Inside a formatted Excel table, formulas fill down automatically and do not spill the same way. Fix: place dynamic array formulas outside tables, or use the table's own calculated column behavior.
Limitations
#SPILL! tells you that space is blocked, but it does not tell you which cell is the culprit when the range is large. You have to inspect the dashed border or use the error menu. In a wide sheet with many formulas, tracking down the obstruction can take longer than the fix itself.
The error also gives no hint about whether the returned array is the size you wanted. A formula that spills 10,000 rows when you expected 10 will report #SPILL! for a completely different reason than a formula blocked by one cell. You have to reason about the array shape yourself.
Finally, spilled formulas do not survive every round trip. Saving to older file formats or opening in older Excel versions can flatten or break them, and the results may change silently.
Frequently Asked Questions
Why does my formula show #SPILL when the cells below look empty?
They may not be truly empty. A space character, a formula returning an empty string, or a leftover value can all block a spill. Select the range and delete the contents, then recheck. Conditional formatting and borders do not block a spill, only actual cell content does.
How do I find which cell is blocking the spill?
Click the warning icon that appears next to the cell showing #SPILL! and choose Select Obstructing Cells. Excel highlights the blocking cells so you can clear them. You can also look for the dashed border that outlines the intended spill range.
Can I stop a formula from spilling?
Yes. Wrap the formula so it returns a single value, or use a function that aggregates the array into one result. If you only want the first value, you can index into the array. The exact function depends on what you are calculating.
Does #SPILL mean my formula is wrong?
Usually not. In most cases the formula logic is correct and the worksheet layout is the problem. Clear the obstruction and the correct values appear. If the values that appear are wrong, then you have a separate formula issue to fix.
Why does the error appear only in one cell?
Excel reports the error in the anchor cell, which is where you typed the formula. The rest of the intended range stays empty because Excel wrote nothing at all. Fixing the anchor cell's spill range clears the error everywhere.
If you are comparing groups of spilled results, the Mean, Median & Mode Calculator can help you summarize the numbers those formulas produce.
References
This article draws on the standard references listed under Further Reading.
Further Reading
- Broman KW, Woo KH (2018). Data Organization in Spreadsheets. The American Statistician
- Ziemann M, Eren Y, El-Osta A (2016). Gene name errors are widespread in the scientific literature. Genome Biology
- Microsoft Support: Excel help and learning
- McCullough B, Heiser DA (2008). On the accuracy of statistical procedures in Microsoft Excel 2007. Computational Statistics & Data Analysis
- Abeysooriya M, Soria M, Kasu MS et al. (2021). Gene name errors: Lessons not learned. PLOS Computational Biology
- Wilson G, Bryan J, Cranston K et al. (2017). Good enough practices in scientific computing. PLOS Computational Biology