Excel Range Errors: Common Causes and Fixes

Learn how to troubleshoot issues related to ranges.

You're staring at a cell full of red error text, and you have no idea why fixing the obvious problem didn't make it go away. That's the thing about Excel range errors that catches most people off guard: they propagate. One broken reference upstream quietly poisons every formula that depends on it, so you end up chasing symptoms instead of the actual cause. This guide covers the four error types that show up most often in structured tables and named ranges#REF!, #SPILL!, #CALC!, and #NAME? — and walks through how to fix each one without accidentally creating a new one in the process.

The fix is almost always simpler than it looks. But you have to read the error token correctly first.


Step 1: Read the Error Token First, Because Each Excel Range Error Points to a Different Cause

Not all range errors mean the same thing. Each token is Excel telling you something specific about what broke. If you skip this step and start poking at formulas, you'll waste time. I've done exactly that more times than I'd like to admit, early in my accounting career, before I learned to stop and read the error before touching anything.

REF and NAME Errors: Broken or Missing References

#REF! means Excel is pointing at a cell or range that no longer exists. The most common cause is deleting a row or column that a formula depended on. When that happens, Excel replaces the valid reference with #REF! directly inside the formula — and any other formula that references that cell inherits the error immediately. That's error propagation in action, and it's why one deleted row can collapse a dozen seemingly unrelated formulas at once. Excel isn't being picky; it's being literal.

#NAME? is a different problem. It usually means a named range was typed incorrectly, or the name was deleted from the Name Manager and the formula still references it. Excel doesn't recognize the text as a valid range name, so it returns #NAME? instead. Check your spelling first — this one is often just a typo.

SPILL and CALC Errors: Dynamic Array Function Conflicts

#SPILL! happens when a dynamic array function — something like UNIQUE, SORT, or XLOOKUP — tries to output results across multiple cells but something is already in the way. The output range is blocked. A less obvious cause: dynamic array functions used inside an Excel table will always return #SPILL!, because Excel tables don't support spilled array output by design. This is a version-specific behavior in Microsoft 365.

#CALC! is the one most tutorials skip. It appears when a dynamic array formula runs correctly but returns nothing — for example, a FILTER function where no rows match the condition. The formula itself isn't broken. There's just no data to return, and Excel signals that with #CALC! rather than an empty cell.

Excel 365 introduced #SPILL! and #CALC! alongside dynamic array functions. If you're on an older version of Excel and these tokens don't appear, your version may not support dynamic arrays at all.


Step 2: Fix Each Excel Range Error Type Without Triggering a New One

Now that you've identified which error you're dealing with, the fix is usually one of a handful of actions. The important thing is to fix the source cell first, not the downstream cells showing the inherited error. That's the mistake that sends people in circles.

Fixing REF Errors After a Row or Column Deletion

  1. If you just deleted a row or column and triggered a #REF! error, your fastest option is Ctrl+Z to undo, then rethink your approach.
  2. If undoing isn't an option, open the affected formula and repoint the broken reference manually. Look for #REF! sitting inside the formula itself and replace it with the correct range.
  3. Going forward, use a named range instead of a hard cell reference. Named ranges in Microsoft Excel update dynamically as your data moves, so deleting rows won't break them the same way.

For #NAME?, go to Formulas → Name Manager, confirm the range name exists and is spelled exactly as your formula expects, then re-enter the formula.

Clearing a Blocked SPILL Range in an Excel Table

  1. Click the error cell and look for the small dotted border showing the intended output range.
  2. If there's data blocking that range, clear it. If the cells are truly empty but the error persists, check for spaces or invisible characters.
  3. If the formula is inside an Excel table and you need the dynamic array to work, either move the formula outside the table or convert the table back to a plain range so the spill range can expand freely.

Moving the formula outside the table and converting the table to a range are both valid fixes — your choice depends on whether you need the table formatting for other reasons. Neither is wrong.

Handling CALC Errors in FILTER and XLOOKUP

For #CALC!, wrap your FILTER or XLOOKUP in IFERROR or IFNA to return something useful when there's no match: an empty string, a zero, or a message like "No results."

Treat IFERROR as a finishing tool, not a debugging tool. Get the formula working correctly first. IFERROR catches every error type — so if your formula has a genuine mistake, it will hide that too.

Common Mistakes When Troubleshooting Excel Range Errors — and How to Stop Them From Spreading

The biggest mistake people make (and I made it myself as a staff accountant) is fixing the cell showing the error instead of tracing it back to the source. If cell D12 shows #REF! because it references B4, and B4 shows #REF! because you deleted a column, fixing D12's formula won't solve anything. Fix B4 first.

The second mistake is retyping cell ranges by hand after something breaks. Hard-coded ranges like B2:B50 break the moment your data structure changes. Named ranges and structured table references don't have this problem because they're anchored to the data, not a fixed address. If you're not already using them as your default, that's the single change that prevents most recurring range errors.

The third mistake is underestimating how far one bad cell travels. A single #REF! or #CALC! in a source column can cascade silently through every formula that references it. In a large workbook, that can mean dozens of cells showing errors that have nothing individually wrong with them. Use Formulas → Trace Dependents to map the propagation before you start fixing anything.

Error Token What It Means Most Common Cause First Fix to Try
#REF! Reference no longer exists Deleted row or column Ctrl+Z or repoint the formula
#NAME? Range name not recognized Typo or deleted named range Check Name Manager spelling
#SPILL! Output range is blocked Data in spill range or inside a table Clear blocked cells or move formula outside table
#CALC! No data to return FILTER with no matching rows Wrap in IFERROR with a fallback value

If you take one thing from this article: switch to named ranges or structured table references wherever you're currently using hard cell addresses. It's the most effective habit I've seen, across nearly two decades of working in Excel daily, for keeping range errors from coming back.


Frequently Asked Questions

Why does my Excel formula show a REF error after I deleted a row?

When you delete a row or column, any formula that referenced a cell in that row or column loses its target. Excel replaces the reference with #REF! directly inside the formula, and every formula downstream that references that cell inherits the error. Using named ranges instead of fixed cell references prevents this, because named ranges track the data rather than a static address.

What causes a SPILL error when I use a dynamic array function inside an Excel table?

Excel tables in Microsoft 365 don't support spilled array output — it's a structural limitation, not a formula mistake. When a dynamic array function like SORT or UNIQUE tries to expand its results inside a table, it hits that restriction and returns #SPILL!. The fix is to move the formula outside the table, or convert the table to a plain range first.

What is the CALC error in Excel and how do I fix it in FILTER or XLOOKUP?

The #CALC! error appears when a dynamic array formula runs without errors but finds no data to return — for example, a FILTER function where no rows match the condition. The formula logic is fine; there's just nothing to display. Wrapping the formula in IFERROR or IFNA and specifying a fallback value (like an empty string or a message) handles it cleanly.

How do named ranges prevent range errors in Excel formulas?

Named ranges are tied to the data, not a fixed cell address, so they update automatically as your spreadsheet structure changes. If you insert or delete rows, a named range adjusts; a hard-coded reference like B2:B50 doesn't. Switching to named ranges and table references is the most reliable way to prevent recurring range errors in Excel.

Does the SPILL error behave the same way in Google Sheets as in Microsoft 365?

Not exactly. Google Sheets handles dynamic array spilling natively and doesn't use the #SPILL! token — it typically shows a #REF! error when output is blocked instead. The underlying concept is the same (the output range is occupied), but the error token and the table-specific restriction are specific to Microsoft Excel in Microsoft 365.