Site icon Visboo

Excel Dynamic Arrays vs Google Sheets Arrayformulas: Fixing #SPILL!

A laptop showing an abstract spreadsheet grid with one cluster of cells glowing amber like a spill warning

You write one formula, expect a column of results, and instead get an error. In Excel it is #SPILL!. In Google Sheets it is “Array result was not expanded because it would overwrite data.” They look like different problems, but they are the same story told by two engines with different rules: your formula wants to fill more than one cell, and something is standing in the way. Once you understand how each tool expands, both errors stop being mysterious.

Excel and Google Sheets both spread a single formula across many cells, and both refuse to do it silently if that would clobber your data. The differences are in when they expand automatically, what they call the error, and how you clear it. Here is the head-to-head, with the fixes for each and the pattern that keeps shared templates from breaking.

The Short Answer

Excel dynamic arrays spill automatically and throw #SPILL! when the output cells are blocked. Google Sheets auto-expands array-returning functions and needs ARRAYFORMULA to broadcast others, showing “array result was not expanded” when the output is blocked. Both protect your data instead of overwriting it, and the fix for both is the same: clear everything out of the range where the result needs to land.

Excel vs Google Sheets: Array Behavior at a Glance

Excel Dynamic Arrays Google Sheets
How it expandsSpills automatically for array functionsAuto-expands array functions; ARRAYFORMULA for others
The error#SPILL!“Array result was not expanded”
Main triggerCells in the spill range are blockedCells in the output range are blocked
Reference the outputSpill operator, like A1#Reference the range directly
Big gotchaWon’t spill inside a Ctrl+T TableNeeds ARRAYFORMULA around many functions

How Each One Expands

In modern Excel, array formulas spill by default. Type =SORT(A2:A20) in one cell and Excel fills the cells below with the sorted list automatically, resizing the spill range as the source grows or shrinks. You reference the whole result with the spill operator, so =SUM(C2#) sums the entire spilled range no matter how long it gets.

Google Sheets splits the behavior. Array-returning functions like FILTER, SORT, UNIQUE, and SEQUENCE also auto-expand into the cells they need. But to apply an ordinary formula down a whole column, you wrap it in ARRAYFORMULA, as in =ARRAYFORMULA(A2:A20*B2:B20), which tells Sheets to compute the whole range at once instead of just one cell. That extra wrapper is the biggest day-to-day difference between the two.

Both tools spread one formula across many cells. The rules for when they expand, and when they refuse, differ.

The #SPILL! Error: Why Excel Blocks

Excel shows #SPILL! when a dynamic array cannot fill the cells it needs. The usual causes are specific and worth memorizing:

To fix it, click the formula, use the spill-range indicator to see where it wants to go, and clear whatever is blocking it. If a Table is the culprit, move the formula to open cells or convert the table to a range with Table Design, then Convert to Range. Microsoft’s guide to correcting a #SPILL! error walks through each cause with screenshots. The reassuring part is that Excel never overwrites your content to make room. The error is its way of protecting what is already there.

#SPILL! and “not expanded” both mean the same thing: clear the cells where the result needs to land.

The “Not Expanded” Error: Why Sheets Blocks

Google Sheets shows “Array result was not expanded because it would overwrite data in [cell]” for the same core reason: the output range is not clear. Functions such as FILTER, SORT, UNIQUE, SEQUENCE, and IMPORTRANGE need empty cells below or beside the formula, and if any of those cells holds a value, formula, space, or merged cell, Sheets stops rather than overwrite it.

The error is actually helpful because it names the first cell in the way. Go to that cell, then clear the entire range the result needs, keeping the array formula in its top-left cell. If the data below is something you need to keep, move it, or constrain the formula’s output so it fits. As in Excel, Sheets is refusing to destroy existing data, not malfunctioning.

An array function needs a clear output range. One stray value in the way, and Sheets refuses to expand.

The Safer Pattern for Shared Templates

Both errors show up most often in templates that other people fill in, because a teammate types a note into a cell your formula was counting on. A few habits keep that from happening.

Give every spilled or array formula a clear runway: leave the cells below and to the right empty, and do not mix manual entries into a column that a formula expands into. Put dynamic results in their own dedicated area, separate from where people type. In Excel, keep dynamic arrays out of Ctrl+T Tables, since that combination is a reliable source of #SPILL!. In Sheets, wrap column-wide calculations in ARRAYFORMULA so a single formula at the top drives the whole column, rather than pasting a formula into every row where anyone might overwrite it. Build the template so the output zone and the input zone never overlap, and both errors largely disappear.

Shared templates break when input and output zones overlap. Keep them separate and the errors stop.

How We Compared Them

We focused on the behavior people run into most: a formula that should fill a range but returns an error instead. The technical details come from Microsoft’s and Google’s own documentation on dynamic arrays, the #SPILL! error, and array expansion, cross-checked against the specific complaints users raise in communities like r/excel and r/googlesheets. We prioritized the causes that appear most often, especially blocked ranges, merged cells, and Excel Tables, and paired the comparison with fixes and a prevention pattern rather than a feature-by-feature spec sheet, because the goal is to get your formula working and keep it working.

The Bottom Line

Excel and Google Sheets solve the same problem with different manners. Excel spills eagerly and warns you with #SPILL! when it cannot; Sheets asks for ARRAYFORMULA on many formulas and warns you when expansion would overwrite data. Neither error means your formula is wrong, only that the space it needs is occupied. Clear the output range, keep dynamic results away from cells people edit, and remember Excel’s Table trap, and you will spend far less time staring at either message. The array does the heavy lifting once you give it room to land.

For more spreadsheet and software guidance, browse our business section and technology section.

Frequently Asked Questions

What is the difference between Excel dynamic arrays and Google Sheets Arrayformulas?

Excel dynamic arrays spill results automatically for array functions and use the spill operator, like A1#, to reference the whole output. Google Sheets auto-expands array-returning functions like FILTER and SORT, but needs ARRAYFORMULA wrapped around ordinary formulas to apply them across a range. Both spread one formula over many cells; Excel does it more automatically, while Sheets often needs the ARRAYFORMULA wrapper.

How do I fix a #SPILL! error in Excel?

Clear whatever is blocking the spill range. Click the formula to see where it wants to expand, then delete any values, formulas, spaces, or merged cells in those target cells. If the formula sits inside a table made with Ctrl+T, move it to open cells or convert the table to a range using Table Design, then Convert to Range. Excel spills automatically once the output cells are empty.

Why does Google Sheets say “array result was not expanded”?

Because a cell in the range where the result needs to appear already contains something, so Sheets stops rather than overwrite it. The error names the first blocking cell. Go there, clear the full output range below or beside your formula, and keep the array formula in its top-left cell. If you need the data that is in the way, move it or limit the formula’s output size.

Why can’t I use a dynamic array inside an Excel Table?

Excel Tables created with Ctrl+T use structured references that conflict with how dynamic arrays spill, so a spilling formula returns #SPILL! inside a table. The fix is to move the dynamic array formula to normal cells outside the table, or convert the table back to a range with Table Design and Convert to Range. This is one of the most common causes of the error.

Do both Excel and Google Sheets protect against overwriting data?

Yes, and that is the key thing to understand. Neither tool will silently erase your existing content to make room for an array result. Excel shows #SPILL! and Google Sheets shows “array result was not expanded” precisely to warn you that the output range is occupied. Both errors are safeguards, so the fix is always to clear or move whatever is in the way.

Exit mobile version