Dynamic arrays and spilled array behavior

Beginning in September, 2018, all Excel formulas that return multiple values, also known as an array, will return results to neighboring cells. This behavior is called spilling.

Any formula that has the potential to return multiple results can be referred to as a dynamic array formula. Formulas that are currently returning multiple results, and are successfully spilling, can be referred to as  spilled array formulas. 

Following are some notes to help you understand, and use these type of formulas. 

What does spill mean?

Spill means that a formula has resulted in multiple values, and those values have been placed in the neighboring cells. For example, =SORT(D2:D11,1,-1), which sorts an array in descending order, would return a corresponding array that's 10 rows tall. But you only need to enter the formula in the top left cell, or F2 in this case, and it will automatically spill down to cell F11.

Sort the values in cells D2:D11 with =SORT(D2:D11,1,-1)

Note: September 24, 2018: Spilled array functions are currently a beta feature, and only available to a portion of Office Insiders at this time. We'll continue to optimize these features over the next several months. When they're ready, we'll release them to all Office Insiders, and Office 365 subscribers.

Key points

  1. When you press Enter to confirm your formula, Excel will dynamically size the output range for you, and place the results into each cell within that range.

  2. If you are writing a dynamic array formula to act on a list of data, it can be useful to place it in an Excel table, then use structured references to refer to the data. This is because structured references automatically adjust as rows are added or removed from the table.

  3. Spilled array formulas are not supported in Excel tables themselves, so you should place them in the grid outside of the Table. Tables are best suited to holding rows and columns of independent data.

  4. Once you enter a spilled array formula, when you select any cell within the spill area, Excel will place a highlighted border around the range. The border will disappear when you select a cell outside of the area.

    Array formula with the output range highlighted with a blue border

  5. Only the first cell in the spill area is editable. If you select another cell in the spill area, the formula will be visible in the formula bar, but the text is "ghosted", and can't be changed. If you need to update the formula, you should select the top-left cell in the array range, change it as needed, then Excel will automatically update the rest of the spill area for you when you press Enter.

    Image of a ghosted array formula, meaning it's not editable, since it's not the first cell in the array range

  6. Formula overlap - Array formulas can't be input if there is anything blocking the output range. and if this happens, Excel will return a #SPILL! error indicating that there is a blockage. If you remove the blockage, the formula will spill as expected. In the example below, the formula's output range overlaps another range with data, and is shown with a dotted border overlapping cells with values indicating that it can't spill. Remove the blocking data, or copy it somewhere else, and the formula will spill as expected.

    Image of a #SPILL! error indicating that an array formula output is experiencing a blockage that prevents it from spilling.

  7. Legacy array formulas entered via CTRL+SHIFT+ENTER (CSE) are still supported for back compatibility reasons, but should no longer be used. If you like, you can convert legacy array formulas to dynamic array formulas by locating the first cell in the array range, copy the text of the formula, delete the entire range of the legacy array, and then re-enter the formula in the top left cell. Before upgrading legacy array formulas to dynamic array formulas, you should be aware of some calculation differences between the two.

  8. Excel has limited support for dynamic arrays between workbooks, and this scenario is only supported when both workbooks are open. If you close the source workbook, any linked dynamic array formulas will return a #REF! error when they are refreshed.

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.

See Also

FILTER function

RANDARRAY function

SEQUENCE function

SINGLE function

SORT function

SORTBY function

UNIQUE function

#SPILL! errors in Excel

Expand your Office skills
Explore training
Get new features first
Join Office Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.