ExcelyourTraining

Home › Blog

#SPILL! error in Excel, plus #CALC! and #NAME?: why new formulas break and how to fix them

You copied a formula from a colleague, a video or an AI assistant. It looked simple. You pressed Enter and got an error you've never seen before.

Modern Excel functions like UNIQUE, SORT and FILTER bring three errors with them: #SPILL!, #CALC! and #NAME?. Each one has a short list of causes, and each cause has a quick fix. By the end of this post you'll know what a #SPILL! error in Excel means, how to find the cell that's causing it, and what to do when FILTER finds nothing or your Excel doesn't recognise the function at all.

First, what does "spill" mean in Excel?

Older formulas return one answer into one cell. Newer ones can return a whole list. You type the formula in one cell and the results flow, or spill, into the cells below and beside it.

Here's a small sales sheet:

A B C
1 Rep Region Sales
2 Aisha Gauteng R9 450.00
3 Pieter Western Cape R6 120.50
4 Thandi Gauteng R11 300.00
5 Bongani Eastern Cape R4 875.25
6 Karen Western Cape R7 640.00

Type =UNIQUE(B2:B6) in E2 and Excel fills E2 to E4 with Gauteng, Western Cape and Eastern Cape. Only E2 holds the formula. E3 and E4 just show its results. Click any of them and a blue border marks the spill range.

A spill needs empty space. When it can't get that space, you see #SPILL!.

How to fix a #SPILL! error in Excel

Click the cell showing #SPILL!. Excel draws a dashed border around the area it wants to fill. That border tells you where to look. Then work through the causes below.

1. Something is in the way

This is the most common cause. Any cell inside the spill range that isn't empty blocks the whole result. Delete it or move your formula, and the list appears.

The tricky part is that a blocking cell can look empty. It might hold a single space, a formula that returns an empty text string (""), or text in a white font. To find it, click the #SPILL! cell, click the small warning icon beside it and choose Select Obstructing Cells. Excel jumps straight to the culprit.

2. Merged cells

A formula can't spill into merged cells. If someone merged a heading across E3:F3 to make the sheet look neat, a spill from E2 will fail. Unmerge the cells (Home > Merge & Center to toggle it off) or move the formula to a clear area.

3. The formula is inside an Excel Table

If your data is formatted as a Table (the striped kind you get from Insert > Table), spilling formulas don't work in its columns. Type =UNIQUE(...) in a Table column and you'll get #SPILL!.

The fix is to put the formula in a normal cell outside the Table. You can still point it at the Table's data, and that's a good idea: when the Table grows, the spilled result grows with it. The other option is to convert the Table back to a normal range (Table Design > Convert to Range), but then you lose the Table's other benefits.

4. The result would run off the sheet

This one usually comes from referencing a whole column. A formula like =B:B*1.15 (adding 15% VAT to every cell in column B) tries to return about a million results. Placed anywhere below row 1, that runs past the bottom of the worksheet, so Excel stops with #SPILL!.

Point the formula at the rows you actually use, such as =B2:B6*1.15. Or turn your data into a Table and refer to the Table column, which sizes itself.

Less common causes

Excel also shows #SPILL! when the result is too big for memory, or when the size of the result keeps changing between calculations (usually because of random functions like RANDBETWEEN inside the size). If none of the causes above fit, check that your formula has every argument it needs.

Why FILTER shows #CALC!

Say you want every sale from KwaZulu-Natal:

=FILTER(A2:C6,B2:B6="KwaZulu-Natal")

There aren't any, so the result would be an empty list. Excel can't return an empty list, so it shows #CALC! instead.

It isn't a broken formula. It's FILTER saying "nothing matched". You fix it with FILTER's optional third argument, which tells Excel what to show when there are no results:

=FILTER(A2:C6,B2:B6="KwaZulu-Natal","No sales")

Now the cell reads "No sales". You can use any text, a 0, or "" for a blank cell.

Add this third argument every time, even when you're sure there will be matches. Data changes. A report that works for Gauteng today can break next month when someone picks a region with no sales yet.

If you do expect matches and still get #CALC!, check the condition itself. A stray space ("Gauteng ") or a different spelling ("Kwazulu Natal") in the data means nothing matches exactly.

Why UNIQUE or FILTER gives #NAME?

#NAME? means Excel doesn't recognise a name in your formula. With modern functions there are two likely reasons.

A typo. =UNIQE(B2:B6) or =FILTRE(...) gives #NAME?. Start typing the function name and pick it from the list Excel offers, so the spelling is always right.

Your version doesn't have the function. UNIQUE, SORT and FILTER are part of what Microsoft calls dynamic arrays. They're available in:

Excel 2019, Excel 2016 and older don't have them. Type =UNIQUE( there and you'll get #NAME?. The same can happen when you send a workbook built in Microsoft 365 to someone on an older version. Microsoft's own guidance warns that formulas using newer functions may not calculate correctly in older versions.

To check your version, go to File > Account (Windows) or Excel > About Excel (Mac).

If you're stuck on an older version, you have a free option. Excel for the web comes with a free Microsoft account, runs in your browser and supports UNIQUE, SORT and FILTER. It's a good way to practise these functions before you need them at work. Keep in mind that the web version doesn't have every desktop feature.

A quick checklist

When a modern formula breaks, check in this order:

  1. #SPILL! Click the cell, look at the dashed border, use Select Obstructing Cells. Then check for merged cells, a Table, or whole-column references.
  2. #CALC! from FILTER: add the third argument, then check the condition for spelling and spaces.
  3. #NAME? Check the spelling, then check your Excel version.

Practise the fix, not just the formula

The fastest way to stop fearing these errors is to cause one on purpose and fix it. Both lessons below run in a real spreadsheet in your browser:

Try it yourself, free, with no sign-up. Each answer is graded the moment you press Enter.

ExcelyourTraining isn't affiliated with Microsoft. Excel is a trademark of Microsoft Corporation.