Independent. Reader-supported. Tested before publishing.
Emely Correa
emelycorrea.com
In Excel

Every Excel Error Code Explained: #REF!, #NAME?, #VALUE!, #SPILL! and More

A complete field guide to every error code Excel can throw — what each one means in plain English, and the cleanest formula to fix it.

EC
Excel

Every Excel error is a tiny message from Excel telling you what went wrong. Once you can read the language, the cryptic codes stop being cryptic. You stop guessing. You start fixing. Here's every error code Excel can throw, what each one actually means, and the cleanest formula to fix it.

Bookmark this article. Six months from now you'll see one of these in a spreadsheet and you'll remember there was a guide that explained it.

##### (the wall of hashes)

Not really an error, even though it looks like one. The column is too narrow to display the number — or, occasionally, the cell contains a negative date or time, which Excel refuses to display because it makes no semantic sense.

Fix: Double-click the right border of the column header to auto-fit width. If the result is something like "-37" in date format, you've got a deeper problem — date arithmetic that went negative. Wrap the result in =MAX(0, your_formula) or fix the underlying subtraction.

#DIV/0!

You divided by zero. Or by an empty cell, which Excel treats as zero.

Fix: The cleanest modern pattern is IFERROR:

=IFERROR(A2/B2, 0)

If you want to be explicit about testing for zero rather than hiding every possible error:

=IF(B2=0, 0, A2/B2)

And if you want a blank result when there's no data:

=IFERROR(A2/B2, "")

#N/A

"Not available." A lookup formula — VLOOKUP, HLOOKUP, MATCH, XLOOKUP — couldn't find what you asked for.

Fix: Before you "fix" the error, check that the value really isn't there. Usual suspects:

To suppress the visual error once you've confirmed it's a legitimate "not found":

=IFNA(VLOOKUP(A2, table, 2, FALSE), "Not found")

#NAME?

Excel doesn't recognize a name in your formula. Almost always a typo or a missing reference.

Fix: Check for, in order:

#NULL!

Rare. You put a space between two ranges that don't intersect. Spaces in Excel formulas are an undocumented "intersection operator" — =A1:A10 B1:B10 means "cells that appear in both ranges," which in this case is nothing.

Fix: Replace the space with a comma (for separate arguments) or a colon (for a range): =SUM(A1:A10, B1:B10).

#NUM!

A number problem. Either the result is too large for Excel to handle, or you've fed a function an invalid input — like asking for the square root of a negative number.

Fix: Identify the function. Common offenders:

#REF!

The most destructive of the errors. A formula refers to a cell that no longer exists — usually because you deleted the row, column, or worksheet it depended on.

Fix: If you just did the deletion, hit Ctrl + Z immediately and breathe. If it's too late:

  1. Press Ctrl + F, search the workbook for #REF!, identify every affected formula.
  2. For each one, decide what it should point to and rewrite the reference.
  3. If there's no obvious replacement, the data the formula needed is gone — substitute a sensible default and leave a comment explaining why.

Preventive habit: before deleting rows or columns in a complex workbook, use Find & Replace to search for references to those ranges. You'll see what's about to break before you break it.

#VALUE!

A formula has the wrong type of input — usually text where a number was expected.

Fix: The usual cases:

#SPILL!

The newest of the error codes, only relevant in modern Excel with dynamic arrays. A formula tried to spill results into adjacent cells, but those cells weren't empty.

Fix: Click the cell with the error. Excel shows a dashed border around the cells it wanted to spill into. Three options:

#CALC!

Also new. A dynamic-array calculation produced an empty result — typically a FILTER that didn't match anything.

Fix: FILTER takes an optional third argument exactly for this:

=FILTER(range, criteria, "No matches")

For other functions, wrap in IFERROR or sanity-check the input range.

#GETTING_DATA

Excel is fetching data from an external source — Power Query, an OLAP cube, a web query — and hasn't finished yet. The cell updates itself once the fetch completes.

Fix: Wait. If it persists for minutes, the source connection is broken — check Data → Queries & Connections.

#BLOCKED!

You're using a feature that requires a working internet connection and the external service failed. Typically you'll see it on Stocks/Geography data types or on Microsoft 365 connected services.

Fix: Check your network. Re-run Data → Refresh All. If it persists, the service is down — try again later.

#UNKNOWN!

Mostly appears when you open a file with a function the current Excel doesn't recognize — for example, opening a Microsoft 365 file with LAMBDA-based formulas in Excel 2019.

Fix: Upgrade the receiving Excel, or rewrite the formula with functions both versions support.

The one pattern that handles almost everything

If you just want a formula that doesn't show an ugly error message no matter what input it gets, the modern catch-all is IFERROR:

=IFERROR(your_formula, "")

But — and this is important — use it sparingly. IFERROR hides errors rather than fixing them. An error you've hidden is a bug you've quietly stopped noticing. For final display formulas in a polished report, it's fine. For formulas other people will edit later, leave the error visible so they know something needs attention.

Bookmark this article

The next time you see an Excel error code you don't recognize, come back here. Most have a specific, predictable cause — and once you've fixed a few of each kind, the patterns become obvious. Excel's error messages are short, but they're not random. They're trying to tell you something. Now you can read them.

Filed under Excel Formulas Errors IFERROR
EC

Written by

Emely Correa

Independent writer at Emely Correa. Practical, hands-on guides for Windows, Microsoft 365, and the apps you reach for every day. Got a topic request? Email hello@emelycorrea.com.

The Sunday note

Get more guides like this in your inbox.

One short email a week. No marketing, unsubscribe anytime.