Yes, the #SPILL! error in Excel means a dynamic array formula is trying to return multiple results, but something is blocking those results from being placed in the cells below or to the right of the formula cell. The fix is almost always to clear whatever is in the spill range, or to move your formula so it has enough empty space. This guide walks you through every cause and cure, from the simplest click to the more subtle structural issues.
What You'll Need
- An Excel file that contains a #SPILL! error (or a formula you suspect will cause one).
- Access to the worksheet where the error appears.
- Familiarity with selecting cells and reading Excel's error messages (the yellow warning icon next to the error).
Step-by-Step
Step 1: Identify the Spill Range
Click on the cell that shows #SPILL!. Excel draws a dashed blue border around the range of cells that the formula is trying to fill. That is your spill range. Look at that bordered area. If you see any text, numbers, or even formatting that is not part of your formula's output, that is your blocker.
Step 2: Clear the Blocking Cell(s)
The most common fix is simply to delete whatever is in the spill range. Select the cells inside the dashed border, press the Delete key on your keyboard, and press Enter. The formula should immediately recalculate and fill the range. If the blocker is a merged cell, unmerge it first (select the merged area, go to the Home tab, and click Merge & Center to toggle it off).
Step 3: Check for a Table
If your formula is inside an Excel Table (the kind created with Ctrl+T), dynamic array formulas cannot spill into the table's columns. The table structure blocks the spill. The fix is to move your formula outside the table, or convert the table back to a normal range (right-click the table, choose Table, then Convert to Range). If you need the table functionality, consider using a regular formula with @ (implicit intersection) or a SUMPRODUCT formula instead of a dynamic array.
Step 4: Look for a Merged Cell in the Spill Area
Merged cells are a frequent cause. Even if the merged cell is empty, it still counts as a blocker because Excel cannot place individual values into a merged region. To find merged cells, press Ctrl+G (Go To), click Special, choose Merged cells, and click OK. Unmerge any that fall within the spill range.
Step 5: Examine the Formula for Volatile Functions
Some functions like RAND(), RANDBETWEEN(), NOW(), and OFFSET() are volatile. When used inside a dynamic array formula, they can cause Excel to recalculate repeatedly and sometimes trigger a #SPILL! error if the result size changes between calculations. If you have such a function, try replacing it with a non-volatile alternative (e.g., use RANDARRAY() for random numbers, or INDEX instead of OFFSET). If you must keep it, press F9 to recalculate and see if the error clears.
Step 6: Check for a Spill Range That Exceeds the Worksheet Edge
If your formula tries to spill beyond the last column (XFD) or last row (1048576), you get a #SPILL! error. This can happen if you reference an entire column or row in a calculation that returns an array. For example, =A:A*2 would try to spill into over a million rows. Instead, limit the range to the actual data, like =A1:A100*2.
Step 7: Verify the Formula Is Not in a Merged Cell Itself
If the cell containing the formula is merged, Excel cannot spill. Unmerge that cell. Also, if the formula is in a cell that is part of a named range that overlaps the spill area, that can cause issues.
Step 8: Check for Array Formulas from Older Excel Versions
If the file was created in an older Excel version (before 365), it might contain legacy CSE array formulas (entered with Ctrl+Shift+Enter). When opened in a newer Excel, those may convert to dynamic arrays and spill. If you see curly braces {} around the formula in the formula bar, select the cell, press F2, and then press Ctrl+Shift+Enter again to keep it as a legacy array, or rewrite it as a dynamic array formula.
Step 9: Use the Error Checking Tool
Click the small warning icon (a yellow triangle with an exclamation mark) next to the #SPILL! cell. Excel will show a dropdown with options like "Select the blocking cells" or "Edit in Formula Bar." Use these to jump directly to the problem.
Common Mistakes
- Ignoring the dashed border: The border is your map. Many users try to guess the blocker instead of looking at the border.
- Deleting the formula instead of the blocker: If you delete the formula, you lose the calculation. Delete the contents of the spill range, not the formula cell.
- Forgetting about hidden rows/columns: A hidden row or column can still contain data that blocks the spill. Unhide all rows and columns (select all, right-click a row/column header, choose Unhide) before troubleshooting.
- Using full-column references:
=A:Ais a common mistake. Always use a specific range like=A1:A100. - Not checking for blank cells with spaces: A cell that looks empty but contains a space character (or a formula that returns "") is still a blocker. Press Ctrl+~ to show formulas and see if any "empty" cells have content.
Tips
- Use the # operator to refer to the spill range: If you have a formula in B2 that spills to B2:B10, you can reference that whole range in another formula by typing
=B2#. This is dynamic and adjusts automatically. - Keep your spill range clear by design: If you know a formula will spill, clear the area in advance. You can also use a helper column to the right or below to keep other data away.
- Use IFERROR with dynamic arrays carefully:
=IFERROR(formula, "")will not suppress a #SPILL! error because the error occurs before the IFERROR can evaluate. Instead, fix the cause. - Check for data validation: Data validation dropdowns in the spill range can also block the spill. Remove any data validation from cells in the spill area.
- Use Excel's built-in "Spill" error check: Go to Formulas tab > Error Checking > Error Checking. Excel will cycle through errors, including #SPILL!, and offer options.
Troubleshooting
If the error persists after clearing the spill range
First, press Ctrl+Alt+F9 to force a full recalculation. If that doesn't help, close and reopen the workbook. Sometimes Excel's calculation engine gets stuck.
If the error only appears when you open the file on another computer
The other computer may have a different version of Excel that does not support dynamic arrays (e.g., Excel 2016 or 2019). The formula will show a #SPILL! error because it is treated as a legacy array. On that computer, you can either edit the formula to be a normal formula (remove the array context) or use a different approach like SUMPRODUCT.
If the error is in a formula that references another sheet
Check if the referenced sheet has any filters or hidden rows that change the array size. Also, if the referenced range includes entire columns, it will try to spill into the same number of rows, which may exceed the sheet limit.
If the error is intermittent
This usually points to a volatile function or a formula that depends on a changing range (e.g., a named range that expands). Review the formula's inputs and make them as static as possible.
If you see "Spill range is unknown"
This happens when Excel cannot determine the size of the array. It often occurs with functions like SEQUENCE() that have dynamic arguments. Check the arguments to ensure they are numeric and not volatile.
If nothing works
Copy the formula to a new cell, or type it again from scratch. Sometimes the formula gets corrupted. Also, check if the workbook is in compatibility mode (the title bar will show "Compatibility Mode" next to the file name). If so, save it as a .xlsx file in the current format.
Frequently Asked Questions
Why does my formula show #SPILL! when the cells look empty?
Cells can look empty but contain a space, an apostrophe, or a formula that returns an empty string. Press Ctrl+~ to see all formulas, and use the Go To Special > Constants to find hidden text.
Can I use IFERROR to hide a #SPILL! error?
No. IFERROR only catches errors that occur during calculation, but #SPILL! is a structural error that happens before the formula evaluates. You must fix the root cause.
Does #SPILL! damage my data?
No, it's just an error message. Your formula is not executed, and the spill range is left untouched. Once you clear the blocker, the formula will run normally.
Why does my formula spill into more cells than I expected?
Dynamic arrays automatically resize based on the input. If you reference a range that is larger than needed, the spill will be larger. Use the # operator to limit the output, or use functions like TAKE() or FILTER() to control the size.
What is the difference between #SPILL! and #VALUE!?
#VALUE! is a calculation error (e.g., text where a number is expected). #SPILL! is a placement error—the formula is correct but cannot output its results because something is in the way.
Can I prevent #SPILL! from happening in the future?
Yes, by keeping your spill ranges clear, avoiding merged cells, and using specific ranges instead of entire columns. Also, use the @ operator to force a single result if you only need one value.