Sub topic 11
Version compatibility and known limits
This chapter assumes you have read the chapters on the spill range, the # operator, #SPILL! and the @ operator. You should be comfortable with FILTER, SORT and UNIQUE. Dynamic arrays work in current Excel, but they do not work everywhere, and a few limits stay even where they do. This chapter covers which versions support them, what happens when a workbook crosses versions, and the limits to plan around.
Which versions support dynamic arrays
Dynamic arrays are part of the calculation engine, so a version either has them or does not. Older versions cannot get them through an add-in or setting.
| Product | Dynamic arrays and spilling | Notes |
|---|---|---|
| Microsoft 365 (Windows, Mac, web, mobile) | Yes | Receives new functions first. |
| Excel 2021 and later (perpetual) | Yes | Has `FILTER`, `SORT`, `SORTBY`, `UNIQUE`, `SEQUENCE`, `LET` and `XLOOKUP`. |
| Excel 2019, 2016, 2013 and earlier | No | Only legacy array formulas (Ctrl+Shift+Enter). |
Having the engine does not mean having every function. Microsoft adds functions over time, and a perpetual version contains only the functions that existed when it shipped. Excel 2021 can spill, but it may not have TAKE, VSTACK or the LAMBDA helpers. Check the "Applies to" list on a function's documentation page before you rely on it in a shared workbook.
Within Microsoft 365, update channels also matter. A user on a delayed channel can get a new function weeks or months after another user does.
What happens when a workbook crosses versions
Compatibility problems appear when a file moves between an Excel that has dynamic arrays and one that does not. The two directions behave differently.
Opening an old workbook in modern Excel
Older workbooks were written under implicit intersection rules. A formula could silently return a single value where a range was given. Modern Excel keeps those results the same by inserting @ where the formula could now return several values:
=@A2:A6The @ is not a mistake and does not change the result. If you want the formula to spill, delete the @ and confirm the edit. Check first, because the formula may then spill into cells that already hold data, and you will get #SPILL!.
Legacy Ctrl+Shift+Enter formulas keep their curly braces and their fixed range. They still work, and they do not resize. You can convert one by selecting its cell, editing the formula and pressing Enter. This turns it into a dynamic array formula that spills.
Opening a new workbook in an older Excel
An older Excel cannot spill, so it falls back to what it understands:
- A formula that spilled is shown as a legacy array formula in braces. It covers the range it last spilled into, so the range is fixed from then on.
- Functions the old version does not know are stored with an
_xlfn.prefix, for example_xlfn.FILTER(...). - After a recalculation, unknown functions return
#NAME?. The old version shows the saved values only until it recalculates. - If the data later changes the spill size, the old version cannot resize the array. Results can be cut off or padded with
#N/A.
To find out before you share a file, use File > Info > Check for Issues > Check Compatibility. It lists the features an older version will not support.
Choosing a sharing strategy
You have three practical options when other people use older Excel versions.
- Agree on a minimum version. Name the version in your documentation. This is the simplest option and the least error-prone.
- Avoid dynamic functions in shared sheets. Use
INDEX,SUMPRODUCTand legacy array formulas in the parts that older users will open. - Hand over values. Copy the spill range and use Paste Special > Values for a copy of the report that you send out. The recipient sees numbers, not formulas, so nothing can break.
Do not assume that everyone has Microsoft 365. Ask.
VBA: Formula and Formula2
Macros have their own compatibility issue. The Range.Formula property uses the old implicit-intersection rules. When you assign a formula through it, Excel may insert @ in front of it and the formula will not spill. Range.Formula2 uses the dynamic array rules.
Sub WriteSpillingFormula()
With ThisWorkbook.Worksheets("Sheet1")
' Formula inserts @ and returns a single value
.Range("E2").Formula = "=SORT(UNIQUE(A2:A20))"
' Formula2 behaves like typing the formula in the cell
.Range("G2").Formula2 = "=SORT(UNIQUE(A2:A20))"
End With
End SubWhen you update older macros, switch the assignments of array-returning formulas to Formula2. Reading a formula back with Formula also shows @ where modern Excel would not show it.
Known limits of spilling
Even where dynamic arrays are supported, a few limits stay in place. The table lists the ones that cause most problems.
| Limit | What you see | Workaround |
|---|---|---|
| Spilling formulas cannot be entered inside an Excel table. | `#SPILL!` (table cause) | Keep the formula outside the table, or reference the table's columns from a normal range. |
| A spill range cannot cross merged cells. | `#SPILL!` | Unmerge the cells, or move the formula. |
| An array cannot contain another array, or a range of ranges. | `#CALC!` | Return a single flat array. Use `TOCOL`, `HSTACK` or a `LAMBDA` helper to reduce the nesting. |
| A spill range cannot go beyond the sheet edge (1,048,576 rows, 16,384 columns). | `#SPILL!` (too big) | Reduce the result size with `TAKE` or `FILTER`. |
| A formula referencing a closed workbook may not work. | `#REF!` | Keep both workbooks open, or use Power Query to import the data. |
| Data tables (What-If Analysis) do not support spilling formulas. | `#SPILL!` or no result | Use a normal formula layout. |
The first limit is the one people meet most often. You can write =SORT(Table1) in a normal cell, and it spills fine. If you put it inside a table, it fails. Tables grow by adding rows, and a spill range that also grows would conflict with that.
A formula that works but is slow
Spilling does not make a formula cheap. A formula that calls FILTER on a large range over and over recalculates in full each time. When the same expression appears twice in one formula, Excel evaluates it twice, unless you name it with LET:
=LET(rows, FILTER(A2:C20, C2:C20>100, "No matches"), SORT(rows, 3, -1))Volatile functions such as RANDARRAY change this too. They recalculate whenever anything in the workbook changes, and every formula that depends on their spill range recalculates with them.
Other quirks
- Editing part of a spill range. You cannot change or delete a single spilled cell. Edit the anchor cell.
- The
#operator on a non-spilling cell.=SUM(E2#)returns#REF!if E2 holds anything other than a spilling formula. - Sorting a range that contains a spilled array. Excel's Sort command cannot sort a range that contains a spill. Use
SORTorSORTBYin the formula instead. - Other spreadsheet programs. Google Sheets and LibreOffice have some of the same function names, but spilling and
#behave differently or do not exist. Test an exported file in the program that will open it.
A compatibility check you can run
You can confirm what a recipient will see with a short test. Enter this in a blank cell:
=SEQUENCE(3)In a version with dynamic arrays, three numbers spill down. In an older version, the cell shows #NAME? or a single value. A sheet like this is a quick way to find out what a colleague's Excel can do before you build a report around it.
Exercise
A colleague with Excel 2019 opens your workbook, which has =SORT(UNIQUE(A2:A20)) in E2. The sheet looks correct. A week later, after they edit a cell, E2 and the cells below it show #NAME?. Explain what happened and give two ways to prevent it.
Show answer
Excel 2019 has no dynamic arrays and does not know SORT or UNIQUE. It displayed the saved values from the file, with the formula shown as a fixed legacy array formula. Editing a cell caused a recalculation, which evaluated the unknown functions and returned #NAME?. To prevent this, agree on a minimum Excel version that supports dynamic arrays, or send the colleague a copy where the spill range has been pasted as values. You could also rebuild the report with formulas that Excel 2019 supports.
Exercise
You assign =FILTER(A2:C20,C2:C20>100) to a cell from VBA with Range.Formula. The result is a single value and the formula shows @. What do you change, and why?
Show answer
Use Range.Formula2 instead. Formula applies the old implicit intersection rules and inserts @, so the formula returns one value. Formula2 uses the dynamic array rules, so the formula spills as it does when typed in the cell.
Exercise
=SORT(Table1) works in cell H1 outside your table but returns #SPILL! when you move it into a new column of the table. Why, and what should you do?
Show answer
Excel tables do not support spilling formulas, because a table's size is managed by its own rows and columns. Move the formula back outside the table, or reference the table's columns from a formula in a normal range.