#SPILL! Error in Excel 365: What It Really Means and How to Fix It

blank

If you have been using Excel 365 for a while, you have almost certainly run into a cell showing #SPILL! in red, with no obvious reason why. You cleared what looked like a blank area. You checked for data. Nothing. The error stayed.

This guide covers every cause of the Excel spill error, but it focuses on the one that trips up even experienced users: an invisible character hiding in a cell that blocks the spill range without any visual sign it is there.

Everything in this article applies to both Excel 365 and Excel 2021, since both versions support dynamic arrays. Excel 365 gets more attention here simply because it is the version most people are running, and it receives dynamic array improvements on a rolling basis that Excel 2021 does not.

Excel spreadsheet showing #SPILL! error in cell C1 after spill range is blocked
The #SPILL! error appears in the formula cell when Excel cannot write results into the range below it.

What Is a Spill Error in Excel 365?

Excel 365 introduced dynamic arrays, which let a single formula return multiple results that automatically fill (“spill”) into a range of cells. Functions like FILTER, SORT, UNIQUE, XLOOKUP, and SEQUENCE all rely on this behavior.

When Excel cannot complete that spill because something is already occupying one or more of the destination cells, it shows #SPILL! instead of returning your results.

Excel showing blue dashed border around the spill range when clicking a cell with #SPILL! error
Clicking the formula cell reveals a blue dashed border showing the full range Excel is trying to fill.
Excel #SPILL! error tooltip showing the message spill range is not blank
The warning tooltip tells you the specific reason the spill failed.

The formula itself is not broken. The spill range is blocked.

The Common Causes of #SPILL! (And Quick Fixes)

Before getting to the hard case, here are the straightforward scenarios.

1. Visible Data in the Spill Range

Another value or formula is sitting in a cell that your formula needs to write into.

Fix: Move or delete the conflicting content, then press Enter on your formula cell to recalculate.

2. The Formula Is Inside a Table

Excel Tables do not support dynamic array spilling. If your formula sits inside a formatted Table (Insert > Table), Excel blocks the spill.

Read also:  When to Use TRUE in VLOOKUP - Why It’s Rare, And Some Alternatives

Fix: Move the formula to a cell outside the Table range, or convert the Table back to a normal range (Table Design > Convert to Range).

3. Merged Cells in the Spill Range

Merged cells are fundamentally incompatible with spill behavior. If any merged cell overlaps your intended spill range, you get #SPILL!.

Fix: Select the merged cells, go to Home > Merge and Center, and click it again to unmerge. Then recheck your formula.

4. The Spill Range Is Too Large

Some formulas produce an array so large it would extend beyond the worksheet’s last row or column (row 1,048,576 or column XFD).

Fix: Revisit your formula logic to limit the output size, or use arguments like [rows] and [columns] in SEQUENCE to constrain the result.

The Hard Case: An Invisible Character Blocking the Spill

This is where most articles stop, and where most users get stuck.

You hover over the spill error indicator. Excel highlights the spill range in a blue dashed border. You look at every cell in that range. They all appear empty. You click on each one. The formula bar shows nothing. You press Delete anyway. The error persists.

Excel cell appearing empty but causing #SPILL! error due to a hidden space character
Cell C3 looks completely empty, yet it is blocking the entire spill range. A single space character is the cause.

The culprit is almost always a space character, or occasionally a non-printing character like a tab or line break, sitting in one of those cells. It is completely invisible to the eye, it does not show in the formula bar on a quick glance, and it makes the cell non-empty as far as Excel is concerned.

This happens more than you might expect. Common sources include:

  • Pasting data from a website or another application that left trailing spaces behind
  • A formula that once returned a space (" ") before it was deleted
  • Importing from a CSV or external system that pads fields with spaces
  • Accidental keystrokes in a cell that was then “cleared” by pressing Delete only once

How to Find the Invisible Character

Method 1: Check the Formula Bar Carefully

Click each cell in the highlighted spill range one at a time and look at the formula bar. A space character will show as a tiny gap at the start or after the cursor. It is easy to miss. After clicking, press the End key and then Home to move through any content.

Method 2: Use LEN() to Expose It

In a spare cell next to the suspicious range, enter:

=LEN(B2)

LEN function returning 1 for a visually empty Excel cell containing a space character
LEN() returns 1 on what looks like a blank cell, confirming a hidden character is present.

Replace B2 with the cell you want to check. If the cell looks empty but LEN() returns anything other than 0, there is hidden content in it. A result of 1 almost always means a single space character.

Read also:  Excel “Stale Value” Explained: What It Means, Why It Happens, and How to Fix It Fast

Method 3: Use ISBLANK() to Scan the Range

=ISBLANK(B2)

ISBLANK function returning FALSE on an empty-looking Excel cell that contains a space
ISBLANK() returns FALSE while the cell appears empty. Both LEN and ISBLANK together pinpoint the problem cell instantly.

A truly empty cell returns TRUE. A cell containing only a space returns FALSE, which immediately identifies the problem cell.

Method 4: Find and Replace

This is the most efficient method when the spill range is large:

  1. Select the entire spill range (click the formula cell, then look at the blue dashed border to see what Excel is trying to fill).
  2. Press Ctrl + H to open Find and Replace.
  3. In the Find what field, type a single space character.
  4. Leave the Replace with field completely empty.
  5. Click Replace All.
Excel Find and Replace dialog with a space character in the Find what field and empty Replace with field
Type one space in the Find what field and leave Replace with completely empty, then click Replace All.

Excel will report how many replacements it made. Even one means it found your hidden blocker.

Method 5: Use TRIM() or CLEAN() on Suspect Source Data

If your data comes from an import or paste, wrap your source references in TRIM() to strip leading and trailing spaces before they cause problems:

=FILTER(TRIM(A2:A100), B2:B100=”Active”)

CLEAN() removes non-printing characters (character codes 0 through 31):

=FILTER(CLEAN(A2:A100), B2:B100=”Active”)

Using both together covers the widest range of invisible character types:

=FILTER(TRIM(CLEAN(A2:A100)), B2:B100=”Active”)

Step-by-Step: Diagnosing Any #SPILL! Error

Use this sequence whenever you encounter the error:

  1. Click the cell showing #SPILL!.
  2. Look at the blue dashed border Excel draws to show the intended spill range.
  3. Check the yellow warning icon to read the specific message (“Spill range isn’t blank” is the most common).
  4. Scan each cell in the spill range visually.
  5. If nothing obvious appears, run =LEN() or =ISBLANK() on each cell.
  6. If you find a hidden character, use Find and Replace (Ctrl + H) to clear spaces across the entire range at once.
  7. If the formula is inside a Table, move it outside.
  8. If merged cells are present, unmerge them.
  9. Press Enter on your original formula cell to recalculate.

Preventing #SPILL! Errors Before They Happen

A few habits eliminate most spill errors before they occur.

Leave buffer space. When you write a dynamic array formula, leave several empty rows and columns below and to the right. This gives the spill range room to grow if your data expands.

Clean imported data immediately. Any time you paste or import from outside Excel, run a TRIM/CLEAN pass on the data before using it as a source for dynamic array formulas.

Avoid merging cells in working ranges. Merged cells solve a visual formatting problem but create functional problems across many Excel features, not just dynamic arrays. Use Center Across Selection (Format Cells > Alignment) instead for a visually identical result that does not break formulas.

Keep dynamic array formulas outside Tables. If you need both a Table and dynamic arrays, place the formula in a cell adjacent to the Table rather than inside it.

Read also:  Why Use INDEX MATCH Instead of VLOOKUP in Excel?

Quick Reference: #SPILL! Causes and Fixes

CauseHow to IdentifyFix
Visible data in spill rangeCell shows content in the blue-bordered areaMove or delete the data
Space or invisible characterLEN() returns > 0, ISBLANK() returns FALSECtrl + H, find space, replace with nothing
Formula inside a TableFormula cell has Table formattingMove formula outside the Table
Merged cells in rangeCells visually span multiple columns or rowsUnmerge all cells in the spill range
Output exceeds sheet boundarySpill range reaches row 1,048,576 or column XFDConstrain formula output size

Frequently Asked Questions

What does #SPILL! mean in Excel 365?

The #SPILL! error means a dynamic array formula cannot write its results because one or more cells in the destination range are not empty. Excel 365 formulas like FILTER, SORT, UNIQUE, and SEQUENCE need free space to output multiple values automatically.

How do I fix the Excel spill error when the cells look empty?

If the spill range appears empty but the error persists, a space or non-printing character is likely hiding in one of the cells. Use the LEN() function on each cell in the range. Any result above 0 means hidden content is present. Then use Find and Replace (Ctrl + H) to search for a space and replace it with nothing.

Can the #SPILL! error happen because of merged cells?

Yes. Merged cells block spill ranges even if they do not contain any data. Unmerge all cells within the intended spill range and the error will resolve.

Why does my dynamic array formula show #SPILL! inside a Table?

Excel Tables do not support dynamic array spilling. Move your formula to a cell outside the Table, or convert the Table to a normal range using Table Design > Convert to Range.

How do I find which cell is blocking the spill range?

Click the cell showing #SPILL! and look at the blue dashed border Excel draws around the intended spill area. Then use =ISBLANK() or =LEN() on each cell in that range. ISBLANK() returning FALSE on a visually empty cell points directly to the problem.

Does TRIM fix #SPILL! errors caused by space characters?

TRIM prevents spaces in your source data from causing issues, but it does not fix an existing space sitting in a destination cell. To fix that, select the spill range, press Ctrl + H, search for a space character, and replace it with nothing.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top