Excel’s #SPILL! error means a formula is trying to return results into multiple cells, but Excel cannot place the full array in its intended spill range. Find the formula cell, inspect the outlined destination range, and remove whatever is blocking it; also check for merged cells or a formula inside an Excel table, where dynamic arrays cannot spill.
What the spill error means
Modern Excel formulas can return more than one result from a single formula. Instead of entering a formula separately in every destination cell, you enter it once in an anchor cell, and Excel fills the neighboring cells with the results. That automatic expansion is called spilling. The anchor cell contains the formula; the other cells in the spill range display its results.
For example, a sorting formula can return an ordered list from one cell. With unsorted values 9, 3, and 6 in A2:A4, and the formula entered in C2, =SORT(A2:A4) returns 3, 6, and 9 in C2:C4. If C3 or C4 already contains something, Excel cannot put the complete result there and may show #SPILL! in C2.
The error is not usually a sign that the formula’s calculation is wrong. It means Excel cannot place the results where they need to go. The intended spill range can change when the source data changes, so a formula that worked yesterday may show the error after someone types into a destination cell or adds a merged cell.
How to find what is blocking the results
Start with the cell displaying #SPILL!. In Excel for Microsoft 365 on Windows, select that cell and look for the dashed outline showing where the results are supposed to go. You can also select the warning icon beside the cell and choose Select Obstructing Cells when that option is available. Excel will help identify cells that interfere with the spill.
Check the entire outlined area, not just the first cell beside the formula. A single occupied cell anywhere in the intended range can prevent the whole array from appearing. A cell can look empty and still contain a space, an apostrophe, or a formula that returns an empty string. Such a formula may display nothing, but the cell is not truly empty for this purpose.
To clear unwanted contents, select the blocking cells and use Home > Clear > Clear Contents, or select them and press Delete on a Windows keyboard. Clearing contents leaves formatting in place. If the values are important, move them elsewhere rather than deleting them. Formatting alone, such as a fill color or border, generally does not block a spill; cell contents and merged cells are the more likely causes.
On Excel for Mac, the same basic check applies: select the error cell and inspect the indicated spill area. Ribbon labels and keyboard behavior can differ slightly by release. In Excel for the web, select the formula cell and inspect the range in the browser; some desktop diagnostic options may not be presented in exactly the same way.
Common causes and their fixes
- Occupied destination cells: Clear or relocate the contents inside the outlined spill range. Check for spaces and formulas that display blank as well as visible values.
- Merged cells: A spill range cannot include merged cells. Select the affected area and use Home > Merge & Center to unmerge it, or move the formula so its results do not cross the merged area. Preserve the layout first if unmerging would affect the worksheet design.
- Formula entered in an Excel table: Dynamic array formulas do not spill from within a table. Put the formula in the worksheet grid outside the table, or convert the table to a normal range if you no longer need table features. To convert, select a table cell and use Table Design > Convert to Range; the tab appears when a table is selected.
- Spill range would extend beyond the worksheet: A formula near the bottom or right edge of the grid may need more rows or columns than remain available. Move the formula to a place with enough space or limit the formula’s output.
- Unpredictable output size: In unusual cases, a formula involving volatile calculations can produce an output size that Excel cannot settle on during calculation. Review nested functions that change their returned dimensions, then restructure the formula so the size is stable. This is different from an ordinary blocked cell.
After correcting the cause, Excel normally recalculates the formula automatically. If it does not, check that calculation is set to automatic under Formulas > Calculation Options > Automatic. Avoid clearing an entire large area until you have checked whether it contains data you need.
Examples with dynamic array formulas
These examples assume Excel for Microsoft 365 or a version with dynamic array support. In each case, enter the formula only in the stated first cell and leave the expected destination cells clear.
- Sort a short list: With the values 9, 3, and 6 in A2:A4, enter
=SORT(A2:A4)in C2. The results are 3, 6, and 9 in C2:C4. If C3 contains an old value, the formula in C2 cannot spill until that content is moved or cleared. - Return distinct entries: With names in A2:A6, enter
=UNIQUE(A2:A6)in C2. If the source values are Ana, Ben, Ana, Dev, and Ben, the results are Ana, Ben, and Dev in C2:C4. A value in C4 blocks the result even though the formula itself is in C2. - Filter matching rows: With records in A2:B10 and status values in B2:B10, enter
=FILTER(A2:B10,B2:B10="Open","No matches")in D2. It returns the rows whose status is Open, or the text No matches if there are none. Leave enough clear cells to the right and below D2 for however many matching rows are returned.
SORT, UNIQUE, and FILTER are available in Microsoft 365 and Excel 2021 or later. If you open a workbook in an older Excel release that does not support a function, you may see a different compatibility problem rather than a normal spill blockage.
Spill ranges, anchor cells, and references
The formula is stored in the anchor cell, usually the upper-left cell of a returned array. The other cells are results generated by that formula. You generally cannot edit one of those result cells separately; select the anchor cell to change the formula. If a result cell appears blank, it may still belong to the array, so check the formula’s full spill range before typing into it.
Excel lets you refer to a formula’s current spill range with the spill-reference operator, a hash sign placed after the anchor cell reference. For example, if a formula in C2 spills into a list, =COUNTA(C2#) in another cell counts the nonblank results in that spill range. The range represented by C2# can expand or contract as the formula’s output changes. This is useful for dependent formulas and charts, but it does not remove a blockage: the original formula still needs clear cells in which to spill.
A related symbol is @, which can appear in formulas for implicit intersection: it asks Excel to return a single value from a range or array in a context that expects one. It is not a repair for #SPILL!. If you see it after opening an older workbook, it may reflect how Excel handles formulas written before dynamic arrays; inspect the formula’s intended result before removing it.
What #SPILL! does not mean
#SPILL! is different from other Excel errors. #VALUE! usually indicates an invalid value or argument for a calculation, while #NAME? often means Excel does not recognize text in a formula as a valid name or function. A spill error specifically concerns placing an array result into worksheet cells.
It is also not the same as a formula returning several values in a single cell as text. A dynamic array occupies a range of cells. Nor does a visible blank guarantee that a cell is available: a formula returning "" can display an empty-looking result while still occupying its cell. Conversely, colored formatting in a genuinely empty cell is not, by itself, usually a spill obstruction.
Another common misconception is that the entire result must be manually copied down. With a supported dynamic array formula, Excel fills the spill range automatically. Copying the formula into each expected result cell can create new conflicts and is usually not the right fix.
When clearing cells is not the answer
If the outlined spill area appears clear, look for merged cells, hidden content, or a table boundary. Unhide relevant rows or columns temporarily if needed, and inspect cells in the area rather than relying only on appearance. A formula may also be designed to return more rows than expected when the source list grows, so leave room for future results rather than clearing only the currently visible cells.
If the formula is inside a table, moving it just one column may not be enough if that cell is still part of the table. Place it outside the table’s boundaries. Keeping the source data in a table is often useful; the formula that produces a spilling result can sit in a separate worksheet area and refer to the table’s columns.
For a formula that must produce one result rather than an array, consider whether a single-value function or a deliberate aggregation is more appropriate. Do not force a formula to return only one value simply to hide the error if the intended output is a list. If a worksheet design cannot accommodate a spill range, use a suitable alternative such as a traditional copied formula, a PivotTable, or a separate results area, depending on the task.
Frequently Asked Questions
How do I fix a #SPILL! error in Excel quickly?
Select the error cell, inspect the outlined destination range, and remove or move any contents blocking it. Check for merged cells and whether the formula is inside a table. Then allow Excel to recalculate.
Can formatting cause a spill error?
Ordinary cell formatting, such as color, borders, or number formats, generally does not block a spill. Existing contents, including a formula that displays a blank, and merged cells are common causes. Clear contents only after confirming they are not needed.
Why does Excel say #SPILL! when the cells look empty?
A cell may contain a space or a formula that returns an empty string, even though it looks blank. Inspect the cells in the intended range and use Excel’s obstruction-selection option when available. Also check for merged cells and table placement.
Can dynamic array formulas spill inside an Excel table?
No. A dynamic array formula cannot spill within a table. Put the formula outside the table, or convert the table to a normal range if its table features are no longer needed.
Why can’t I edit one cell in the spilled results?
That cell is a result generated by the formula in the anchor cell, not an independent formula cell. Edit the anchor formula or move it if you need a different result. To change a single value, first consider whether doing so would break the intended array output.
Does #SPILL! mean my formula is wrong?
Not necessarily. Often the formula is valid but its results have nowhere to go. If clearing the spill range does not resolve the error, review the formula, its table location, merged cells, and whether its output size can be determined.
Related
- Excel Data Validation Shortcut: Windows and Mac
- Data Validation Plan in Excel: Build Reliable Checks
- Excel Data Validation: Select Multiple Items from a List
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel Hyperlink Not Working? Fix Links and Common CausesIf an Excel hyperlink is not working, first check whether Excel requires Ctrl+click, then verify the link’s destination…
- Excel UNIQUE Spill Error: Causes, Fixes, and ExamplesIf Excel shows #SPILL! for a UNIQUE formula, it means Excel cannot place the formula’s results in the…
- Excel Not Working After an Update? Causes and FixesIf Excel started crashing, freezing, displaying errors, or behaving differently after an update, first restart Windows and Excel,…
- Hyperlink in Word Not Working? Fixes That Usually HelpIf a hyperlink in Word is not working, first try following it with Ctrl+click on Windows or Command+click…
- Excel Text Wrapping Not Working? Fix the Common CausesIf text wrapping is not working in Excel, select the affected cells and choose Home > Wrap Text,…
- Why Is My IF Formula Not Working in Excel?If your Excel IF formula is not working, first check its syntax, the cell references, and whether the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.