To resolve an Excel #SPILL! error, select the formula cell, identify what is blocking its intended output range, and remove or move that obstruction without deleting wanted data. In Microsoft Excel for Microsoft 365 on Windows, click the warning icon beside the cell and choose Select Obstructing Cells when that option is available; otherwise inspect the dashed outline around the spill range and clear the blocking cells.
What the #SPILL! error means
Excel shows #SPILL! when a formula is designed to return multiple values but cannot place those values into the worksheet cells it needs. Dynamic array formulas can return a list, column, row, or grid from one formula. The cell containing the formula is the anchor cell, and the surrounding cells that receive its results form the spill range.
For example, with product names in A2:A8, entering =UNIQUE(A2:A8) in C2 returns each distinct name once, spilling the results down from C2. This function is available in Microsoft 365 and Excel 2021 or later. If a required cell in the output range is occupied, Excel cannot complete the result and marks the formula cell with #SPILL!.
The error is usually about where Excel can put the result, not whether the formula is written correctly. However, Excel also uses the error for certain array-size and calculation situations. The error details usually identify the specific issue, so check them before changing the formula.
Check the error details first
Select the cell showing #SPILL!. Excel typically outlines the intended output range with a dashed border. The warning icon next to the cell may offer a description and a Select Obstructing Cells command. That command can take you to cells preventing the result from appearing. If it is unavailable, use the dashed outline and inspect the cells inside it.
- Click the formula cell and read the message shown in the error tooltip.
- Note the outlined spill range and check its cells for content, merged cells, or worksheet boundaries.
- Decide whether the current formula output is the result you want. A formula may return more values than expected because its source range includes extra rows.
- Move or clear only the obstruction, then let Excel recalculate.
Clearing a cell removes its contents, so check whether it contains a value or formula you need before pressing Delete. If the obstruction is intentional data, move the formula to a clear area or adjust the formula to return a smaller result instead. The error tooltip is more useful than guessing: a blocked cell and a formula that would run off the worksheet need different fixes.
Remove blocked cells without losing data
The most common cause is a cell in the spill range that Excel does not consider empty. It may contain a number, text, a space, or a formula. A formula that displays an empty-looking result can still occupy the cell and block a spill. Formatting alone, such as a fill color or border in an otherwise empty cell, does not normally block the output.
To fix a content obstruction, select the blocking cell or cells and either move their contents elsewhere or clear them if they are not needed. You can also move the array formula to a blank area. When the source list changes over time, leave enough clear space below or beside the formula for the largest result you reasonably expect.
For example, suppose a formula in D2 returns a list of customer names that should fill D2:D20, but D9 contains a note. Excel cannot place the full list until you move the note or choose a different location for the formula. Deleting the note without checking it may remove useful information, so moving it to another column is often the safer option.
Do not assume that a cell is empty just because nothing is visible in it. Select the suspected cell and look at the formula bar. A space, a formula returning an empty string, or a hidden value can be easy to miss. If a formula occupies the cell, change its location or logic rather than treating it as disposable blank space.
Unmerge cells in the output area
A merged cell anywhere in the required spill range can prevent Excel from filling that range. This can happen even when the merged area appears visually empty. Select the affected merged cell and use Home > Merge & Center > Unmerge Cells. Then check the cells that were part of the merged area and confirm that the spill range is clear.
Unmerging changes the worksheet layout, so consider whether the merged heading or label can be moved outside the output area. If you only need text centered across several columns, Center Across Selection may be a better layout choice than merging cells, but it should be applied carefully and does not itself create space for a spill. The key requirement is that the cells needed for the array result must be available as separate cells.
Move formulas out of Excel tables
Dynamic array formulas cannot spill from inside an Excel table. If the formula cell is part of a formatted table, Excel may return #SPILL! even when the cells below it appear empty. Place the formula in a normal worksheet range outside the table, leaving room for its results. It can still refer to the table as its source.
For instance, a formula that produces a unique list from a table column can sit in a blank area beside or below the table, provided that the output area does not overlap the table or other content. If the formula itself must be within the table, consider whether a conventional row-by-row formula is a better fit; a dynamic array result is intended to spill into neighboring worksheet cells, not populate multiple table rows from one table cell.
Be cautious about converting a table to a normal range just to remove the error. Tables provide useful features such as automatic expansion and structured references. Moving the spill formula outside the table is usually the simpler fix when you still want to keep the table.
Check the spill range size and worksheet edges
A formula can also fail when its result is too large to fit in the worksheet. Excel worksheets have a fixed last row and last column. If the formula is near an edge and its output would extend beyond that boundary, move the formula farther from the edge or reduce the result. A formula that refers to an unnecessarily broad source range may also produce far more results than intended.
Review the formula and the data it refers to. If you meant to return only populated records, use a suitable bounded range or revise the criteria so the result includes only relevant items. Avoid changing a formula to an arbitrary smaller range if new records are regularly added; instead, use a source range that reflects how the data is maintained.
In some cases Excel reports that it cannot determine the spill range size. This can occur when a formula’s output dimensions depend on a volatile calculation that may change during recalculation. For example, a sequence whose row count is based on a newly generated random number may not have a stable size. Use a fixed row count or a stable input value when the output needs a predictable shape, then recalculate. If the message identifies another cause, address that specific issue instead.
Make sure the formula should spill
Not every formula returning an array is meant to produce a long list. If the result is unexpectedly wide or tall, inspect the source references and criteria. A misplaced range reference, an entire-column reference, or a condition that matches more records than expected can make the output much larger than planned. The right correction may be to narrow the formula’s input or move it, rather than clearing many cells.
Spill results are linked to the anchor formula. You generally edit the formula in the anchor cell, not individual cells within its displayed result. If you need a fixed copy of the current results, copy the spill range and use Paste Special > Values in a separate location. That makes a static copy; later changes to the original source will not update those pasted values.
A spill error is different from #CALC!, which can indicate a different calculation problem, such as an empty array result in a context that does not support one. It is also different from a formula returning a single incorrect value. Read the exact error and its explanation before rebuilding a formula that may be working as designed.
Prevent repeat spill errors
Dynamic arrays are easiest to manage when the workbook has a clear place for each result. Leave an unobstructed area for formulas that return lists, and avoid putting notes or manually entered values directly below a formula that may grow. If the output length varies, keep it away from tables, merged cells, and worksheet edges.
- Keep array formulas outside Excel tables when they need to spill into multiple cells.
- Use clear labels outside the expected spill area rather than placing them inside it.
- Review source ranges when a result suddenly becomes much larger than usual.
- Use stable inputs for formulas whose output dimensions must remain predictable.
- Before clearing an obstruction, check whether it contains information worth moving or preserving.
These practices matter especially in shared workbooks, where another person may type into a cell that looks unused but is part of a formula’s future output range. A formula can work for months and then show #SPILL! after someone adds a note in the spill area; the new content, not necessarily a change to the formula, may be the cause.
Frequently Asked Questions
Why does Excel say #SPILL! when the cells look blank?
A cell may contain a space, a hidden value, or a formula that displays a blank result. Select the cells inside the outlined spill range and check the formula bar. Formatting by itself usually is not the obstruction.
Can I put a spill formula inside an Excel table?
No. Dynamic array formulas cannot spill from within a table. Put the formula in a normal worksheet range outside the table, while keeping the table as the formula’s data source if needed.
Will deleting the #SPILL! cell fix the problem?
Usually not. The formula cell is the anchor that produces the result. Find and address the obstruction in the intended spill range, or move or revise the formula if its output does not fit.
Why does Excel show #SPILL! after I add a note?
The note may have been entered into a cell that the formula needs for its output. Move the note outside the outlined range or relocate the formula to a clear area.
Does #SPILL! mean my formula is wrong?
Not necessarily. Often the formula is valid, but Excel cannot place all its results. Check the error details for a blocked cell, merged area, table location, oversized result, or another specific cause before editing the formula.
Related
- Conditional Formatting for Overdue Dates in Excel: Guide
- Conditional Formatting in Outlook: Setup and Limits
- Conditional Formatting Color Scales in Excel Explained
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- VLOOKUP Not Working Unless I Click the Cell?If VLOOKUP appears wrong until you click into its cell and press Enter, Excel is usually not recalculating…
- Section Break in Word Won’t Delete? Here’s WhyYes, you can remove a section break in Word: show formatting marks, place the cursor immediately before the…
- Excel Not Dragging Down Numbers? Fix the Fill HandleIf Excel repeats a number instead of counting up, select the first two numbers in the pattern and…
- Excel All Cells Must Be the Same Size Error ExplainedThe Excel message “To do this, all the merged cells need to be the same size” usually means…
- Excel #REF! Error: Causes, Fixes, and PreventionA #REF! error in Excel means a formula contains an invalid cell reference: Excel can no longer find…
- Excel Freeze Panes Not Working? Fix the ViewIf Excel Freeze Panes is not working, switch to Normal view, select the cell below and to the…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.