The #SPILL! error appears when a dynamic array formula tries to spill results into cells that are blocked—and tables are the most common blocker. Excel tables do not allow spilled arrays inside them, so a formula like =UNIQUE(A2:A10) placed in a table cell returns #SPILL! because the table's structured references and calculated columns require every cell in a column to hold the same formula, not a variable-size spill. The fix is to move the formula outside the table, convert the table to a normal range, or use a non-spilling alternative such as INDEX or a helper column. This guide walks through each option, plus the related cases where a spill range is blocked by other data or merged cells.
What You'll Need
- Excel 365 or Excel 2021 (or later) on Windows, Mac, or the web—dynamic arrays and the #SPILL! error only exist in these versions. Older perpetual versions show #NAME? or #VALUE! instead.
- A workbook containing the table and the formula that is returning #SPILL!.
- Basic familiarity with the Name Box (left of the formula bar) and the Table Design tab, which appears when you click inside a table.
Step-by-Step
- Confirm the error is #SPILL! and not #VALUE! or #REF!. Click the cell with the error. If the message reads "Spill range isn't blank" or "Spill range in table," you are in the right place. If it reads something else, the problem is different and these steps will not apply.
- Check whether the formula sits inside a table. Click the cell. If the Table Design tab appears in the ribbon, the cell is inside a table. Excel tables cannot contain spilled arrays, so any dynamic array formula inside one will fail with #SPILL!.
- Move the formula outside the table. Cut the formula (Ctrl+X or Cmd+X), click an empty cell below or beside the table—outside its borders—and paste it. The spill should now expand normally into the blank cells below. This is the simplest fix and keeps the table intact.
- If you need the result inside the table, convert the table to a normal range first. Click any cell in the table, go to the Table Design tab, and click Convert to Range. Confirm the prompt. The structured references become normal cell references, and the formula can now spill. Note that you lose table features: banded rows, structured references, and automatic expansion when you add rows.
- Alternatively, replace the spilling formula with a non-spilling one. If you must keep the table, use a formula that returns a single value per row. For example, instead of
=UNIQUE(A2:A10), use=IF(COUNTIF($A$2:A2,A2)=1,A2,"")in a helper column to flag first occurrences, then filter the table on that column. For lookups,INDEXandMATCHreturn one value and work inside tables;XLOOKUPalso returns a single value when given a single return column. - If the formula is outside the table but still spills into it, clear the blocked cells. Select the spill range shown by the dashed border, check for any cell containing a space, apostrophe, or formula, and delete it. Even an invisible character blocks a spill. Press Ctrl+Delete to clear contents without deleting formatting.
- Check for merged cells in the spill path. Merged cells cannot receive spilled values. Select the range, go to Home > Merge & Center, and click Unmerge. Repeat until no merged cells remain in the spill area.
- Verify the spill range does not cross into another table's columns. If your formula is outside a table but its spill range overlaps a table, Excel blocks it. Move the formula further away or shrink the source range so the spill fits in empty cells.
- Re-enter the formula with Ctrl+Shift+Enter only if you are on an older version. In Excel 2019 and earlier, dynamic arrays do not exist; legacy array formulas use Ctrl+Shift+Enter and return a fixed-size result. If you see #SPILL! you are on a dynamic-array version, so do not use this step—it will not help.
- Test by adding a row to the table. If the formula is outside the table and references table columns, adding a row should expand the table and the formula should update. If it does not, check that the formula uses structured references like
Table1[Column1]rather than fixed ranges.
Common Mistakes
- Assuming the table itself is broken. The table is fine; it is the formula type that is incompatible. Converting the table is one fix, but moving the formula is less destructive.
- Deleting the table and retyping data. This loses formatting and any formulas that referenced the table by name. Convert to Range instead.
- Using
UNIQUE,SORT,FILTER, orSEQUENCEinside a table. These functions always spill and will always fail inside a table. Use them outside the table or replace them with helper-column logic. - Ignoring invisible characters. A cell that looks empty but contains a space or an apostrophe still blocks a spill. Use Ctrl+Delete to clear contents, not just Delete.
- Forgetting merged cells. Merged cells are a frequent hidden cause of #SPILL! even when the range looks empty.
- Pressing Enter instead of Ctrl+Shift+Enter on legacy versions. On pre-365 versions, array formulas need Ctrl+Shift+Enter; on 365, they do not. Mixing these up produces #VALUE! or unexpected single-cell results.
Tips
- Keep dynamic array formulas in a dedicated area outside any table, and reference the table with structured references so the spill updates as the table grows.
- Use
INDEXwith a row number for single-value lookups inside tables; it is compatible with table calculated columns. - If you need a filtered list inside a table, add a helper column with a formula like
=IF(condition, value, "")and filter the table on that column instead of usingFILTER. - Press F2 then Enter on a spilling formula to see the dashed spill border and confirm the intended range before troubleshooting.
- Name your spill ranges with the Name Box if you reference them elsewhere; spilled range references (the
#operator) work only outside tables. - When converting a table to a range, first copy the table to a backup sheet so you can restore structured references if needed.
Troubleshooting
The formula still shows #SPILL! after moving it outside the table. The new location is blocked. Select the dashed spill border and clear every cell inside it, including cells with spaces. Check for merged cells and for another table overlapping the spill area.
Converting to Range removed my table formatting. Reapply banded rows and borders manually, or use Format as Table on a copy of the data. Note that reapplying a table will reintroduce the #SPILL! if the formula is inside it.
The formula works outside the table but returns #REF! when the table grows. The spill range now overlaps new table rows. Move the formula further down or convert the table to a range so the spill has room.
I see #SPILL! only on some computers. The workbook likely uses dynamic arrays that older Excel versions do not support. Open it in Excel 365 or Excel 2021, or replace the formula with a legacy-compatible one.
Clearing cells did not help. Check for hidden rows or columns inside the spill range; hidden cells still block spills. Unhide them, clear contents, then re-hide if needed.
If that did not work, copy the formula and data to a new sheet, rebuild the table there, and test the formula outside the table. This isolates whether the issue is the workbook structure or the formula itself.
Frequently Asked Questions
Why does Excel show #SPILL! in a table?
Excel tables require every cell in a calculated column to contain the same formula and cannot hold variable-size arrays. Dynamic array functions like UNIQUE, SORT, and FILTER spill into multiple cells, which a table cannot accommodate, so Excel returns #SPILL!.
Can I use dynamic arrays inside an Excel table at all?
No. As of current Excel versions, spilled arrays are not supported inside tables. Use them outside the table, convert the table to a range, or replace the formula with a single-value alternative.
What is the difference between #SPILL! and #VALUE! in this context?
#SPILL! means the formula is valid but its output is blocked. #VALUE! usually means the formula syntax or argument types are wrong. If you see #VALUE! inside a table, check the formula itself rather than the spill range.
Does converting a table to a range lose my data?
No. Convert to Range keeps all cell values and most formatting, but removes table features: structured references, automatic expansion, banded rows, and the Table Design tab. Formulas that used structured references become normal cell references.
Can I keep the table and still get unique values?
Yes, with a helper column. Add a column with a formula like =IF(COUNTIF($A$2:A2,A2)=1,A2,""), then filter the table to show only non-blank rows in that column. This gives a unique list without spilling.
Why does the spill range overlap a table even when the formula is outside it?
Excel blocks any spill that would write into a table's cells. Move the formula further away, shrink the source range, or convert the table to a range so the spill has empty cells to fill.