The #SPILL! error in Excel means a formula that returns several results cannot "spill" them into the cells next to it. Usually something is already in the way. Click the error cell, click the warning icon, choose Select Obstructing Cells, then clear or move whatever is blocking the spill range.
| Error message | What it means | Quick fix |
|---|---|---|
| Spill range isn't blank | Text, a number, a space or a formula sits in the target cells | Select Obstructing Cells, then delete or move them |
| Spill range has merged cells | A merged block overlaps the spill area | Unmerge the cells or move the formula |
| Spill range in table | Spilled formulas are not allowed inside an Excel table | Move the formula out, or use Table Design > Convert to Range |
| Spill range is too big / extends beyond the edge | The result would run past row 1,048,576 or column XFD | Reference a smaller range instead of a whole column |
| Spill range is unknown (indeterminate size) | The result size keeps changing, often because of RANDBETWEEN or RANDARRAY | Give the formula a fixed size |
| Out of memory | The array is too large for available memory | Work with a smaller range |
What does #SPILL! mean in Excel?
#SPILL! means Excel calculated a multi-cell result but had nowhere to put it. In current Excel, a single formula such as =SORT(A2:A20) or =UNIQUE(B2:B500) fills as many cells as it needs, starting from the cell you typed it in. That filled area is the spill range, and Excel draws a thin blue border round it when you select any cell inside it.
Excel will never overwrite your data to make room. If even one cell in the spill range already holds something, the whole result is replaced by #SPILL! in the top-left cell. Microsoft explains the behaviour in its guide to dynamic array formulas and spilled array behaviour.
How do I fix a #SPILL! error in Excel?
Find what is blocking the spill range and remove it. The quickest way is built into the error itself.

- Click the cell showing #SPILL!.
- Click the yellow warning icon that appears beside it. The first line tells you which type of spill error you have.
- Choose Select Obstructing Cells. Excel jumps to and selects the cells in the way.
- Press Delete to clear them, or cut and paste them somewhere else.
- The formula spills as soon as the range is clear. You do not need to re-enter it.
If you would rather keep the blocking data where it is, move the formula instead. Cut the formula cell (Ctrl+X) and paste it into an empty area with enough free rows and columns below and to the right.
Worked example
Say A2:A8 holds a list of regions with duplicates, and you type =UNIQUE(A2:A8) into C2. Someone has left a note in C5.
| Cell | A (Region) | C (formula output) |
|---|---|---|
| 2 | North | #SPILL! |
| 3 | South | (empty) |
| 4 | North | (empty) |
| 5 | East | "check" |
| 6 | West | (empty) |
| 7 | South | (empty) |
| 8 | East | (empty) |
UNIQUE needs C2:C5 for its four results (North, South, East, West). The note in C5 blocks it. Delete C5 and the list appears at once.
What we commonly see: the "blank" cell is not really blank. A single space, an empty string returned by an old formula such as ="", or white text on a white background all count as content. Select Obstructing Cells finds these too, so trust it over your eyes. Pressing Delete on the selected cells fixes all three cases.
Why do I get #SPILL! inside an Excel table?
Spilled array formulas are not supported in Excel tables, so any dynamic array formula typed into a table column returns #SPILL!. Tables expect one value per row, and they fill a formula down the column themselves.
You have two options:
- Move the formula to a cell outside the table. It can still refer to the table, for example
=UNIQUE(Sales[Region]). - Turn the table back into a normal range: click inside it, go to Table Design > Convert to Range, and confirm. You lose table features such as automatic expansion and banded rows.
If you need a per-row result inside the table, rewrite the formula so it returns a single value for that row, such as =[@Price]*[@Qty].
Why does VLOOKUP give a #SPILL! error?
VLOOKUP returns #SPILL! when you give it a whole column as the lookup value, such as =VLOOKUP(A:A,A:C,2,FALSE). In dynamic array Excel, that asks for 1,048,576 results, which would run off the bottom of the sheet unless the formula is in row 1.

Microsoft's guide on how to correct a #SPILL! error gives three fixes:
-
Reference only the values you need:
=VLOOKUP(A2:A7,A:C,2,FALSE). This spills six results. It will not work inside a table. -
Reference one cell and fill down:
=VLOOKUP(A2,A:C,2,FALSE). This is the classic approach covered in our VLOOKUP guide, and it works in tables. -
Use the @ operator and fill down:
=VLOOKUP(@A:A,A:C,2,FALSE). The @ tells Excel to use just the value on the same row.
The same rule applies to any function given a full column where it expects one value. Older workbooks often contain these formulas because pre-2021 Excel quietly used only the same-row value.
What do the other #SPILL! messages mean?
Each variant has its own cause, and the warning icon tells you which one you have.

- Merged cells: a spilled array cannot go into merged cells. Select the merged block and click Home > Merge & Center to unmerge it, or move the formula. For layout, Center Across Selection (Format Cells > Alignment) gives the same look without merging.
-
Indeterminate size: a formula like
=SEQUENCE(RANDBETWEEN(1,1000))changes size on every recalculation, so Excel cannot settle on a spill range. Replace the random size with a fixed number or a cell reference. - Extends beyond the worksheet's edge: the result is taller or wider than the grid. Move the formula higher or further left, or use smaller ranges.
- Out of memory: the array needs more memory than Excel can get. Reference fewer rows.
- Unrecognised / fallback: Excel cannot identify the cause. Check that every argument is present and correct.
Merged cells also break sorting and row tools. If you are tidying a sheet before using dynamic arrays, our guides on inserting and deleting rows and columns and deleting blank rows help.
How do I refer to a whole spill range?
Add a hash sign after the first cell of the spill range. If =UNIQUE(A2:A8) sits in C2, then =COUNTA(C2#) counts every item it returns, however many there are. The # reference grows and shrinks with the result, so you never have to edit ranges by hand.
Advanced nuance: you cannot type into a single cell inside a working spill range. If you do, the source formula immediately shows #SPILL!, because your new entry has become the obstruction. Delete your entry to restore it. Equally, you can only edit or delete the formula from the top-left cell; the other cells show the formula greyed out in the formula bar.
Which Excel versions have the #SPILL! error?
#SPILL! exists only in Excel versions with dynamic arrays: Excel 2021, Excel 2024, Excel in Microsoft 365 and Excel for the web, on both Windows and Mac. Excel 2019 and Excel 2016 do not have dynamic arrays or functions such as FILTER, SORT, UNIQUE and SEQUENCE, so they never show #SPILL!.
If you open a workbook built in newer Excel on Excel 2019 or earlier, spilled formulas appear as fixed-size legacy array formulas, and the new functions return #NAME? if they are recalculated. To share dynamic array workbooks reliably, everyone needs Excel 2021 or later. Office 2021 reached end of support on 13 October 2026, so the version still receiving security updates is Excel 2024 (supported until 9 October 2029). The Office 2024 licence keys collection lists the editions that include it, and our comparison of Excel 2024 vs Excel in Microsoft 365 explains which newer functions stay subscription-only.
Frequently asked questions
Can I turn off spilling in Excel?
There is no setting that switches spilling off. If you want a single result, write the formula so it returns one value. Reference a single cell instead of a range, or put the @ operator in front of the range, as in =@A2:A10*2. Excel then uses implicit intersection and returns only the value from the same row, just as older versions did.
Why does my formula show #SPILL! when the cells look empty?
Cells that look empty can still hold a space, an empty text string from a formula, a hidden apostrophe or text formatted in the background colour. Excel treats all of these as content. Click the warning icon, choose Select Obstructing Cells, and press Delete. Also check for hidden rows or columns inside the spill range, because a value in a hidden cell blocks the spill too.
Does #SPILL! damage my data?
No. #SPILL! is a protective error. Excel refuses to overwrite existing cells, so your data stays exactly where it was. The formula itself is also kept. As soon as you clear the obstruction, the results appear automatically. Nothing is lost, and you do not need to retype the formula or press Ctrl+Shift+Enter.
Can I sort or filter a spill range?
You cannot sort a spill range with the Sort button, because the cells belong to one formula. Wrap the source in SORT or SORTBY instead, for example =SORT(UNIQUE(A2:A8)). To filter, use the FILTER function. Our guide to alphabetising in Excel covers both the Sort button and the SORT function.
Why does a formula from an old workbook now return #SPILL!?
Older Excel silently used implicit intersection, so a formula referring to a whole column picked one value from the same row. Dynamic array Excel returns the whole column instead, which can collide with other cells or run off the sheet. Add the @ operator in front of the range, or change the range to a single cell, to restore the old behaviour.
Related guides
- What is VLOOKUP in Excel? Formula, examples and common errors
- How to alphabetise in Excel
- Excel keyboard shortcuts you will actually use
- Excel 2024 vs Excel in Microsoft 365
Links in this guide
| Link | Type | Why it helps |
|---|---|---|
| Microsoft Support: Dynamic array formulas and spilled array behaviour | External | Official explanation of spilling and spill ranges |
| Microsoft Support: How to correct a #SPILL! error | External | Lists every #SPILL! variant and Microsoft's fixes |
| What is VLOOKUP in Excel? | Internal | The single-cell VLOOKUP pattern that avoids spilling |
| Insert, delete and move rows and columns | Internal | Making room for a spill range |
| Delete blank rows in Excel | Internal | Tidying a sheet before using dynamic arrays |
| Office 2024 licence keys | Internal | Editions that include dynamic array Excel |
| Excel 2024 vs Excel in Microsoft 365 | Internal | Which functions are only in the subscription |
| How to alphabetise in Excel | Internal | Sorting with the SORT function |
| Excel keyboard shortcuts | Internal | Faster cut, paste and navigation when moving formulas |
