Spill: One Excel Formula, a Whole Harvest of Results

Type one formula in one cell, and watch the results overflow like a cornucopia.

Picture the classic cornucopia on a Thanksgiving table: a horn so full that apples, squash, and grapes come tumbling out across the tablecloth. Nobody places each piece of fruit by hand. The horn simply holds more than it can contain, and the harvest spills out. Excel spill formulas work the same way.

For most of Excel's history, one formula meant one answer in one cell. If you needed 20 answers, you copied the formula into 20 cells. Now some functions return a whole list of answers at once. You type the formula in a single cell, and Excel lets the results spill: it fills as many cells below or beside that first cell as it needs.

The group of cells the results spill into is called the spill range, and functions that spill are often called dynamic array functions. They include UNIQUE, SORT, FILTER, SEQUENCE, and others.

Excel spill formulas need Excel for Microsoft 365, Excel 2021 or later, or Excel for the web. In Excel 2019 and earlier, these functions aren't available.

📥 Practice along with us

Download the free practice workbook and try each tip as you read. Open the Spill Basics sheet for this tip. The Answer Key sheet lets you check your results.

Download the practice workbook (Excel)

Meet the Harvest Bakery

The examples below use a small bakery's Thanksgiving pie orders. The headings are in row 4, and the 20 orders are in rows 5 through 24:

A: Order ID B: Customer C: Pie D: Qty E: Pickup Date
51001Martha ReyesPumpkin211/24/2026
61002David KimApple111/25/2026
71003Sarah OlsenPecan311/24/2026
………………
241020Ava ChristensenApple211/25/2026

Column F is left empty on purpose, and the formulas go in column G. The 20 orders include five kinds of pie, each ordered several times.

1. Your First Excel Spill: The UNIQUE Function

The owner wants a simple list of the pies people ordered, with each kind listed only once. The UNIQUE function does exactly that.

  1. Click cell G4 and type the heading Pies Ordered.
  2. Click G5 and type:
    =UNIQUE(C5:C24)
  3. Press Enter.

You typed one formula, but five pies appear in G5 through G9: Pumpkin, Apple, Pecan, Cherry, and Sweet Potato. They're listed in the order each one first appears in the orders.

How to recognize a spill range:

  • Click any cell in the results. A thin blue border outlines the whole spill range.
  • Click G5, and the formula bar shows your formula. That's the only cell that actually holds it.
  • Click G7, and the formula bar shows the same formula in light gray. You can see it, but you can't edit it there. To change the formula, go back to the first cell.

Outcome: A list that used to take a Remove Duplicates step (or a lot of scrolling) now appears from a single formula, and it updates when the orders change.

2. Surround It with SORT

A list is easier to read in alphabetical order. Instead of sorting the results by hand, surround UNIQUE with the SORT function.

  1. Click G5 and press F2 to edit the formula.
  2. Change it to:
    =SORT(UNIQUE(C5:C24))
  3. Press Enter.

The list now reads Apple, Cherry, Pecan, Pumpkin, Sweet Potato. Think about it in English first: "give me the unique pies, then sort them." Excel works from the inside out, so UNIQUE runs first and SORT arranges what it hands back.

Outcome: A tidy, alphabetical list that stays sorted on its own, even when a new kind of pie shows up in the orders.

3. Spill in Two Directions with FILTER

Spills don't have to be a single column. When a formula returns rows and columns, the results spill down and across. The FILTER function is a great example. It brings back only the rows that match a condition.

  1. First, the headings. Click I4, type:
    =A4:E4
    and press Enter. All five column headings spill across I4 through M4. That's an Excel spill too, just sideways.
    Tip: to make them look like the originals, select A4:E4, click Format Painter (the paintbrush on the Home tab), then click I4.
  2. Click I5 and type:
    =FILTER(A5:E24, C5:C24="Pumpkin")
  3. Press Enter.

All six pumpkin orders appear under the headings, with all five columns of information, in I5 through M10. In English, the formula says: "show me the orders in A5:E24 where the pie is Pumpkin."

If the pickup dates show up as numbers like 46350, that's normal. Spilled results bring back the values, not the formatting. Select the date column of the results and apply a Short Date format from the Home tab.

Outcome: A live report of just the orders you care about, without filters, copying, or pasting. Change the order list, and the report changes with it.

4. When the Table Is Too Full: Fixing #SPILL!

A cornucopia needs room on the table. If a dish is in the way of where the harvest would spill, then the spill is blocked. Excel works the same way. If any cell in the spill range already has something in it, the formula shows a #SPILL! error instead of results.

Try it:

  1. Click G7 (inside your sorted pie list) and type Rolls. Press Enter.
  2. The whole list disappears, and G5 shows #SPILL! because the spill range was blocked. The intended spill range is outlined with a dashed border.
  3. Click G5, then click the small warning icon that appears beside it. Choose Select Obstructing Cells. Excel jumps to the cell that's in the way.
  4. Press Delete to clear it. The results spill again.

A few other things can cause #SPILL!:

  • Merged cells in the spill area. Unmerge them.
  • The formula is inside an Excel Table. Tables don't allow spill formulas. Put the formula in a regular cell outside the table.
  • The spill would run off the edge of the worksheet, which usually means the formula is referring to whole columns in an unexpected way.

Something that looks empty can still block a spill. A single space, or text formatted in white, counts as "something in the way." When in doubt, use Select Obstructing Cells.

Outcome: Instead of puzzling over a mysterious error, you can find and clear the blocker in seconds.

5. Let the Spill Grow with an Excel Table

Your formula looks at C5:C24. What happens when order 1021 arrives in row 25? The formula won't see it, because it was told to stop at row 24. The fix is to make the source data an Excel Table, so the range grows on its own.

  1. Click anywhere in the orders (A4:E24) and press Ctrl T. Make sure My table has headers is checked and click OK.
  2. On the Table Design tab, type tblOrders in the Table Name box.
  3. Click G5 and change the formula to:
    =SORT(UNIQUE(tblOrders[Pie]))
  4. Test it: in row 25, add an order for a new pie, such as Pumpkin Cheesecake. The table grows to include it, and the new pie spills into your list automatically.

This is why we left column F empty. The table holds the data, and the spill formula sits beside it, outside the table.

Outcome: Your lists and reports keep up with new data on their own, so nobody has to remember to update a range.

A Few Excel Spill Rules to Remember

  • Only the first cell holds the formula. Edit it there.
  • Leave room. Keep the cells below and beside a spill formula empty.
  • The size is automatic. When the answer gets longer or shorter, the spill range grows or shrinks to fit.
  • Formatting doesn't come along. Format the area where the results land, such as dates or currency.

For Microsoft's own explanation, see Dynamic array formulas and spilled array behavior.

Ready for Second Helpings?

Once an Excel spill formula produces its list, you'll want to use those results in other formulas: a total of every pie, a count of flavors, or a drop-down list that grows with the menu. That's where the # spill range operator comes in. You'll find it in this month's Power Users post, The # and @ Operators: Serving Up Your Spill.

Curious how dynamic arrays could simplify your own spreadsheets? Just contact us and we'd be happy to brainstorm ideas with you.