How to Fix the #SPILL! Error in Excel
A Latina woman in her twenties working on a spreadsheet on a large monitor in a quiet home office, notepad and pen on the desk

How to Fix the #SPILL! Error in Excel

A #SPILL! error in Excel means a formula that returns several results can’t place them in the cells it needs, often because something is already in the way. Select the error cell, select the warning icon next to it, choose Select Obstructing Cells, then delete or move what’s there. The results spill in automatically.

Try these quick fixes first

  1. Select the #SPILL! cell. A dashed border shows the cells the results need.
  2. Select the warning icon next to the cell, choose Select Obstructing Cells, and delete or move what it selects.
  3. Unmerge any merged cells inside the dashed border.
  4. If the formula sits inside an Excel table, move it to an empty cell outside the table.
  5. Replace a whole-column reference such as A:A with just the rows you need, such as A2:A100.
  6. Want one result per row instead of a list? Put @ in front of the range and copy the formula down.

Clear the cells that block the spill range

A formula can’t spill if anything sits in the cells it needs, so one stray entry stops the whole result.

  1. Select the cell that shows #SPILL!. A dashed border marks the spill range, the cells the formula wants to fill.
  2. Select the error checking alert, the small warning icon next to the cell, then select Select Obstructing Cells. Excel jumps to the cells in the way.
  3. Check what’s there before you remove it. To keep it, press Ctrl+X (Command+X on a Mac), select a cell outside the dashed border, and press Ctrl+V (Command+V).
  4. If you don’t need it, press Delete. As soon as the last blocking cell is clear, the formula spills.
  5. Or move the formula itself to a cell with enough empty space below it and to its right.

If the range looks empty but the error stays, use Select Obstructing Cells anyway. It shows exactly which cells Excel counts as in use. Microsoft’s steps are the same in Excel for Windows, Excel for Mac and Excel for the web.

Unmerge cells in the spill range

Spilled results can’t go into merged cells, so a merged cell anywhere inside the dashed border causes #SPILL!.

  1. Select the formula cell, select the warning icon, and choose Select Obstructing Cells to go to the merged cells.
  2. Select Home > the arrow next to Merge & Center > Unmerge Cells.
  3. Text from a merged cell stays in its upper-left cell after you unmerge it. If that cell is still inside the border, move what’s in it.
  4. If you’d rather keep the merged cells, move the formula to a range that doesn’t overlap them.

To list every merged cell on a sheet, select Home > Find & Select > Find, select Options, then Format > Alignment. Check Merge cells, select OK, and select Find All. On a Mac, select the merged cell and choose Unmerge Cells from the Merge & Center menu. In Excel for the web, select the merged cell, then Home > Merge & Center > Merge Cells to unmerge it.

Move the formula out of an Excel table

Spilled array formulas aren’t supported inside Excel tables, so a formula that returns a list shows #SPILL! there.

  1. Select the table cell with the error and press Ctrl+X (Command+X on a Mac).
  2. Select an empty cell outside the table, with room below it, and press Ctrl+V (Command+V). Table references such as Table1[Amount] keep working there and adjust as rows are added.
  3. If you want one result on each row of the table instead, rewrite the formula to use the value on its own row, as the next two sections show.
  4. Or turn the table into a normal range. Select a cell in the table, select Table Design > Convert to Range, and select Yes if Excel asks you to confirm. On a Mac, the command is on the Table tab. In Excel for the web, right-click the table and select Table > Convert to Range.

Converting removes table features. The filter arrows in the header row go away, and formulas that used table names switch to regular cell references.

Point whole-column formulas at the rows you need

A formula such as =VLOOKUP(A:A,A:C,2,FALSE) looks up every cell in column A, so it tries to return 1,048,576 results and runs off the bottom of the sheet unless you give it fewer cells.

  1. Select the formula cell and look in the formula bar for whole-column references such as A:A.
  2. To get a spilled list, refer only to the cells you want to look up, for example =VLOOKUP(A2:A7,A:C,2,FALSE). This style doesn’t work inside an Excel table.
  3. To get one result per row instead, refer to the cell on the same row, for example =VLOOKUP(A2,A:C,2,FALSE), and copy the formula down the column. This style works in tables.
  4. Press Enter.

Older versions of Excel used only the value on the formula’s own row, so a formula written that way out of habit now returns #SPILL!.

Use the @ operator to return one value per row

The @ operator tells Excel to use implicit intersection, which returns the single value from the formula’s own row, the way formulas worked before dynamic arrays.

  1. Select the cell and select inside the formula bar.
  2. Type @ directly in front of the range that should give one value, for example =VLOOKUP(@A:A,A:C,2,FALSE).
  3. Press Enter, then copy the formula down the column. This style also works in Excel tables.
  4. If someone removed an @ that Excel had added to an older formula, such as =@INDEX(A1:A10,B1), type it back. Without it, that part of the formula can return a range and spill.

Excel adds the @ on its own to formulas written in older versions that could return a range, often ones that use INDEX, OFFSET or custom functions. It doesn’t change how they calculate, so leave it in place.

Fix a spill range that keeps changing size

When RAND, RANDARRAY or RANDBETWEEN decides how many results a formula returns, the size changes on every calculation pass, so Excel can’t settle on a range and shows #SPILL!.

  1. Select the cell and read the formula, for example =SEQUENCE(RANDBETWEEN(1,1000)).
  2. Find the part that sets how many rows or columns come back. Here it’s RANDBETWEEN(1,1000).
  3. Replace it with a fixed number, or with a reference to a cell where you’ve typed a number, such as =SEQUENCE(D1).
  4. Press Enter.

Other volatile functions, such as OFFSET, INDIRECT and TODAY, don’t cause this, because they don’t return a different value on every calculation pass.

What if Excel runs out of memory?

A spilled formula over a very large range can need more memory than Excel has, and Microsoft’s fix is to reference a smaller array or range.

  1. Save your work.
  2. Change whole-column or whole-row references to the cells that hold data, for example A2:A5000 instead of A:A.
  3. Close workbooks and apps you aren’t using.
  4. Select the formula cell, press F2, then press Enter to try it again.

Why does this happen?

Excel for Microsoft 365, Excel 2021 and Excel 2024 use dynamic arrays: a formula that returns several values spills them into the cells below it or beside it. #SPILL! means that couldn’t happen, because:

  • Something already sits in the spill range.
  • The range includes merged cells.
  • The formula is inside an Excel table.
  • The results would run past the edge of the sheet, as with a whole-column reference.
  • A random function sets the size, so it never stops changing.
  • Excel ran out of memory.
  • Excel can’t tell what went wrong. Check that the formula includes every argument the function needs.

When should you call IT?

  • The workbook is a shared file that billing, payroll or reporting depends on, and the fix means changing someone else’s formulas or tables. Ask its owner first.
  • Coworkers on older versions of Excel see different results or errors in the same file. Those versions don’t spill, and they show these formulas as older-style array formulas.
  • Excel freezes or crashes while the formula calculates. See our guide to Excel not responding, freezing or crashing.
  • Memory errors keep coming back with large workbooks. Microsoft suggests the 64-bit version of Excel or more memory, which IT can set up.

If your team shares workbooks in OneDrive or SharePoint, see our Microsoft 365 support page.

OAC Technology’s IT support team fixes problems like this for businesses across the Twin Cities. Clients can call 952-548-5558, Monday to Friday, 8 a.m. to 6 p.m. Central. Not a client yet? Call the same number or send us a message.

Common questions

What does the #SPILL! error mean in Excel?

It means a formula returned several results and Excel couldn’t put them on the sheet. It’s the spill error Excel shows when the cells those results need aren’t empty, include merged cells, sit in a table, or run past the edge of the sheet.

Why am I getting a #SPILL! error?

Often, something is in the way. Select the cell, select the warning icon, and choose Select Obstructing Cells to see what’s blocking it. If the range is clear, check for merged cells, a table, or a whole-column reference such as A:A.

What does spill mean in a VLOOKUP?

A VLOOKUP spills when its lookup value is a range instead of one cell, because it returns a result for each value in that range. Pointed at a whole column, it tries to fill the rest of the sheet and shows #SPILL!, so use A2 or @A:A and copy the formula down.

How do I stop a formula from spilling?

Make it return one value. Refer to a single cell, such as A2, or put @ in front of the range, then copy the formula down the column.

Related guides

Author picture

OAC Technology

Author

Related Articles