Excel shows a #SPILL! error when a formula returns multiple results but Excel cannot place those results in the cells around the formula. The usual fix is to clear or move whatever is blocking the intended output range; other causes include merged cells, formulas entered inside a table, or an array that is too large to fit.
What the spill error means
In Microsoft 365 for Windows, many formulas can return an array: a set of values that occupies more than one cell. Excel places the formula in one cell, called the anchor cell, and fills neighboring cells with the results. That process is called spilling. If Excel cannot create the full output range, it displays #SPILL! in the anchor cell instead.
The error is about where results need to go, not necessarily about whether the formula is written correctly. For example, a filter formula may calculate the right matching rows but still fail because a note or another formula sits in the output area. Fixing the destination often resolves the error without changing the formula.
Spill behavior is associated with dynamic-array functions such as FILTER, SORT, UNIQUE, and SEQUENCE, as well as formulas that return arrays in current Excel. These functions are available in Microsoft 365 and Excel 2021 or later, with some newer functions limited to particular releases. A workbook can also show #SPILL! when an ordinary-looking formula produces multiple results through array calculation.
How dynamic arrays choose an output range
Excel starts with the formula cell and determines how many rows and columns the result requires. If the result is five rows tall and two columns wide, Excel needs a clear five-by-two area beginning at the formula cell. The formula remains in the anchor cell; the other displayed values are spill results, not independent formulas that should be edited one by one.
For example, with the number 5 as the intended sequence length and the formula entered in D2, =SEQUENCE(5) returns 1, 2, 3, 4, and 5 down D2:D6. If D5 contains text, Excel cannot complete the result and reports a spill error in D2. The formula’s output can change when its inputs change, so the needed range may grow or shrink after a recalculation.
A dotted outline around the intended range can help show where Excel wants to put the result. Select the formula cell and, when available, use the warning icon beside it to see an explanation or identify obstructing cells. The outline is a useful clue, but inspect the full destination area: an obstruction may be several rows or columns away from the formula.
Common cause: something is in the spill range
The most frequent cause is that one or more cells in the intended output range are not empty. An obstruction may be obvious, such as a label or number, or easy to miss, such as a space, an apostrophe-prefixed entry, or a formula whose displayed result looks blank. A formula returning an empty string is still a formula in that cell, so it can block a spill even though the cell appears empty.
Formatting alone, such as a fill color or border, does not normally make a cell occupied for spill purposes. The important distinction is whether the destination contains a value or formula, not whether it looks blank. Check cells in the outlined area, including any cells hidden by row or column formatting.
- Clear an unwanted entry from the obstructing cell, or move the entry somewhere outside the spill area.
- If the value is needed, move the dynamic-array formula to a larger empty region instead of deleting useful data.
- To inspect a suspected blank, select it and look at the formula bar; also check for spaces and formulas that return an empty string.
Use Delete or Home > Clear > Clear Contents to remove cell contents while retaining formatting. Be careful with broad selections: clearing a range can remove data or formulas you meant to keep.
Merged cells, tables, and other structural blockers
A merged cell in the required output area can prevent Excel from placing an array there. If the spill outline crosses a merged region, select the relevant cells and use Home > Merge & Center > Unmerge Cells. Then check that the result can fit without overwriting nearby content. Unmerging can change the layout, so review the sheet before applying it to a large area.
Dynamic-array formulas cannot spill from inside an Excel table. If a formula that returns multiple values is entered in a table column, Excel may show #SPILL! because table columns are designed to hold a formula for each row rather than a variable-sized spill range. Put the dynamic-array formula in a normal worksheet range outside the table, or use a table-compatible approach that returns one result per row.
Another structural issue occurs when the output would extend beyond the worksheet boundary. Excel worksheets have a fixed number of rows and columns, so an array that would run past the last available row or column cannot be placed. Move the formula to a position with enough room, or adjust the formula so it returns fewer rows or columns.
How to diagnose the exact cause
Work from the anchor cell outward. These checks usually identify the issue without rebuilding the formula:
- Select the cell displaying
#SPILL!and inspect the formula bar to confirm which formula is returning the error. - Look for the dotted spill outline, if Excel displays one, and note its intended dimensions.
- Inspect every cell in that destination, not just the first row. Look for constants, formulas, spaces, merged cells, or another spill range.
- Select the warning icon near the error, if it appears. Excel may provide a cause-specific message or an option to select obstructing cells.
- Check whether the formula is inside a table and whether the destination reaches the bottom or right edge of the worksheet.
- Remove or move only the true obstruction, then allow Excel to recalculate. If the result still fails, recheck the formula and the new size of its output.
If the warning identifies an obstructing cell, selecting it can be faster than tracing a large range manually. Still, verify the contents before clearing anything. A cell that looks like an accidental blank may contain a formula or data used elsewhere.
A practical FILTER example
Suppose A2:B5 contains four names and sales amounts, while C2:C5 contains each person’s region. The rows are Ana, Bo, Cy, and Dee; their regions are North, South, North, and South. Enter the formula in E2, with E2:F5 empty and outside any table. =FILTER(A2:B5,C2:C5="North","No matches") returns two rows: Ana with her sales amount and Cy with her sales amount. If a note is already in F3, that cell blocks the two-column result and can cause #SPILL!.
This example illustrates why changing the criteria is not necessarily the right fix. If the formula is valid and returns two records, the problem may simply be that one cell in E2:F3 is occupied. Clear or relocate the note if appropriate, or move the formula to another clear area. If there are no matching records, the optional third argument displays “No matches” in the formula cell rather than returning a multirow result.
Results can change as the source data changes. A filter that currently returns two rows might return ten after new matching records are added. Leave enough room for the output to grow, or place it in a dedicated area where additional rows will not collide with other information.
Fixes that can make the problem worse
Do not delete the formula just because the anchor cell displays an error. The formula may be correct, and deleting it removes the calculation rather than fixing its destination. Likewise, do not clear the entire outlined range until you know what each cell contains.
Copying a dynamic-array formula into every cell of its expected output is usually unnecessary. The anchor formula spills the results automatically; cells within the spill range display results from that formula. Editing an individual spill-result cell is not the same as editing the formula. Change the anchor formula or its source data instead.
Also distinguish #SPILL! from other errors. #CALC!, #VALUE!, and #REF! indicate different problems and may require different fixes. A spill error specifically points to Excel’s inability to place an array result in its destination, though a formula’s size and structure can be part of the cause.
Version and platform considerations
These instructions focus on Microsoft 365 Excel for Windows. Dynamic arrays are also supported in Excel for the web and current Excel for Mac, but menus and some interaction details can differ. On Mac, use the Home tab for clearing contents or unmerging cells; the ribbon labels are broadly similar, though their placement may vary. Excel for the web has a more compact interface, so a command may be nested differently.
Older Excel versions may not support newer dynamic-array functions such as FILTER or SEQUENCE. Opening a workbook in an unsupported version can produce compatibility issues that are not fixed by clearing cells. If a formula uses a function unavailable in that Excel release, confirm the version requirements or use a compatible alternative. Conversely, if the workbook is current and the displayed error is explicitly #SPILL!, start by checking the output area and table or merge restrictions.
Frequently Asked Questions
How do I fix a spill error in Excel quickly?
Select the #SPILL! cell, inspect the outlined destination, and clear or move the cell content blocking the result. If the formula is in a table or the range contains merged cells, move the formula outside the table or unmerge the affected cells.
Why does Excel say the spill range is not blank when the cells look empty?
A destination cell may contain a space, a hidden value, or a formula that displays an empty string. Select cells in the spill range and inspect the formula bar. Formatting such as a fill color by itself is not usually the cause.
Can I use a spill formula inside an Excel table?
A dynamic-array formula cannot spill from within a table. Put it in a normal worksheet range outside the table, with enough empty space for the results, or choose a formula approach that returns one value per table row.
Does #SPILL! mean my formula is wrong?
Not necessarily. Often the formula is valid but Excel cannot place its full result. Check for blockers, merged cells, a table restriction, or insufficient worksheet space before rewriting the formula.
Why does a spill error appear only after I add data?
The formula’s result may have expanded to include additional rows or columns, and the larger output now overlaps existing content. Check the updated spill outline and leave room for future results in the destination area.
Related
- Excel Analysis Methods: Tools, Steps, and Examples
- Excel Analysis Techniques: Methods, Examples, and Tips
- Dropdown Lists in Google Docs: How to Add and Use Them
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Errors & fixes
- Excel NPV Errors: Why Results Look Wrong and How to Fix ThemExcel NPV errors most often come from including the initial investment in the wrong place, using a discount…
- Standard Error in Excel: How to Calculate ItTo find the standard error of the mean in Excel, divide the sample standard deviation by the square…
- Excel #DIV/0! Error: How to Hide It Without Hiding DataTo stop Excel showing a #DIV/0! error, wrap a division formula in IFERROR or check that its denominator…
- UPPER Formula in Excel Not Working? Fix the CauseIf Excel’s UPPER formula is not working, first check that the function is spelled correctly and the formula…
- 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 the Hyperlink Not Working in Microsoft Word?A hyperlink in Word usually will not open because Word requires Ctrl+click on Windows, the link is only…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.