#SPILL! in Frozen Panes: Visual rendering glitches

A #SPILL! error in worksheets using Frozen Panes occurs when a dynamic array formula attempts to spill across the split boundary between locked panes and scrollable panes. Excel manages frozen panes as separate visual display viewports. If an array originates in a frozen pane and tries to cross the boundary, or if a formula in the scrollable area spills into a region obscured by pane scrolling, Excel can miscalculate boundary coordinates, resulting in persistent #SPILL! errors, ghost borders, or partial array rendering.

Quick Fix

Ensure the dynamic array formula and its entire anticipated spill range reside completely within one pane. If the formula is located in a frozen header row, move it down into the scrollable body rows (below the freeze line). If #SPILL! persists over seemingly empty cells near the freeze line, click View > Freeze Panes > Unfreeze Panes, clear any hidden entries, and re-apply the freeze.


How Frozen Panes Intersect with the Spill Engine

Excel’s Frozen Panes tool divides a single worksheet grid into multiple independent viewports:

┌──────────────────────────────┬──────────────────────────────┐
│       FROZEN TOP-LEFT        │         FROZEN ROWS          │
│       (Fixed Panes)          │      (Fixed Vertically)      │
├──────────────────────────────┼──────────────────────────────┤
│        FROZEN COLUMNS        │       SCROLLABLE BODY        │
│     (Fixed Horizontally)     │    (Scrolls in both axes)    │
└──────────────────────────────┴──────────────────────────────┘

While the underlying cell coordinate system remains continuous (A1, A2, A3…), the visual rendering engine calculates screen coordinates separately for each pane.

When a dynamic array is calculated, Excel executes two distinct steps:

  1. Mathematical Evaluation: The calculation engine checks whether target cells in the worksheet coordinate matrix are empty.
  2. Visual Boundary Mapping: The rendering engine draws the thin blue spill border around the array footprint across the active viewport.

When a spill boundary intersects a pane line, or when scrolling changes the visual alignment of the active grid, this handoff can fail.


Diagnostic Scenarios and Visual Glitches

1. Formula Originates in a Frozen Header and Crosses the Split

Spreadsheet designers often place dynamic summary formulas in top header rows so they remain visible while scrolling:

  • Rows 1 through 3 are frozen.
  • In cell B2, you enter: =SORT(UNIQUE(Data!A2:A100)).
  • The formula generates 25 items and attempts to spill down through B2:B26.

Crossing from Row 3 (frozen pane) into Row 4 (scrollable pane) creates coordinate handling conflicts:

  • If the user scrolls the sheet down to Row 50, Rows 4 through 26 are no longer rendered on screen in their original positions.
  • In certain builds of Excel, this viewport split causes the spill engine to flag boundary collisions, throwing #SPILL!.

The Solution:
Keep vertical dynamic arrays entirely within the scrollable pane. If you need summary metrics anchored in frozen headers, aggregate them so they fit in a single cell:

=TEXTJOIN(", ", TRUE, SORT(UNIQUE(Data!A2:A100)))

Or place your vertical lists in a dedicated sidebar column outside the frozen header block.


2. The “Ghost” Spill Border Glitch

A common visual bug occurs when scrolling rapidly through a worksheet containing large dynamic arrays across split panes:

  • The data values appear to vanish or clip at the split line.
  • The blue spill border remains floating over the wrong cells or disappears completely.
  • Editing the formula produces a #SPILL! error, yet selecting the formula shows an apparently empty spill corridor.

Why this occurs:
This is typically a hardware graphics acceleration desynchronization. Excel’s rendering engine caches the visual state of the frozen pane separately from the scrollable pane. If calculation finishes while the sheet is scrolled mid-row, Excel may detect scroll-hidden cells as occupied coordinates.

The Fix:

  1. Scroll completely back to the top-left of the worksheet (Ctrl + Home).
  2. Go to View > Freeze Panes > Unfreeze Panes.
  3. Press Ctrl + Alt + F9 to force a full recalculation and redraw of all sheet coordinates.
  4. If the array now spills cleanly, select the desired row/column split and re-apply Freeze Panes.

If this issue recurs frequently across complex, chart-heavy workbooks, consider disabling hardware graphics acceleration to stabilize Excel’s rendering pipeline, as covered in The “Graphics Acceleration” Trap: Why disabling hardware acceleration fixes visual glitches..


3. Merged Cells Hidden at the Freeze Boundary

When freeze lines are applied across complex corporate templates, cells located right along the split border are frequently merged to create decorative banners or titles:

  • If Row 3 is the split line, and cells B3:D3 are merged, an array spilling down Column B hits the merged cell.
  • Merged cells are strictly prohibited inside any dynamic array spill corridor and will immediately trigger #SPILL!, as detailed in #SPILL! Error: The “Merged Cell” Blockage.
  • Because the bottom half of the merged cell may be scrolled out of view or obscured by the split line, the cell may appear normal and unmerged at first glance.

Diagnostic Check:

  1. Select the entire column where the spill failure occurs.
  2. Check the Home tab on the Ribbon.
  3. If the Merge & Center button is highlighted, merged cells exist within the selection.
  4. Click Merge & Center to unmerge the range, then delete any residual blank-text entries following #SPILL! Error: Non-Empty cells in the spill range (The “Ghost” character).

Step-by-Step Recovery Procedure

If a dynamic array formula in a frozen-pane sheet remains stuck displaying #SPILL!:

                  [ Array returns #SPILL! ]
                              │
               Does the formula cross the split?
         (e.g., starts in frozen row, spills into body)
                  ├── YES ──► Move formula into scrollable body
                  └── NO
                       │
         Unfreeze Panes (View > Freeze Panes > Unfreeze)
                       │
         Press Ctrl + End to find hidden data/spaces
                       │
         Force Recalculation (Ctrl + Alt + F9)
                       │
         Does the array spill cleanly now?
                  ├── YES ──► Re-freeze panes below the array
                  └── NO  ──► Inspect for merged cells or table conflicts
  1. Unfreeze Panes: Clear all viewport divisions via View > Freeze Panes > Unfreeze Panes.
  2. Locate the Blockage: Click the cell displaying #SPILL!, click the yellow warning alert box, and click Select Obstructing Cell.
  3. Clear Obstructions: Press Delete to ensure the entire target range contains no invisible characters or lingering formatting.
  4. Relocate if Necessary: If the array must remain in a header row, transpose the formula to spill horizontally across columns within the header rather than vertically into the scrollable body: =TOROW(SORT(UNIQUE(A2:A50)))
  5. Re-establish Panes: Re-freeze your view only after verifying that the formula footprint is completely stabilized within its home pane.

For exhaustive troubleshooting of dynamic array blocks and boundary issues across all Excel layouts, see Troubleshooting #SPILL! and #CALC! Errors: The Dynamic Array Diagnostic Guide.