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:
- Trailing spaces. Try
=A2=B2on the two keys. If it returns FALSE for what look like identical strings, you've got hidden whitespace. Wrap both sides inTRIM. - Numbers stored as text. One side is "1234" (string), the other is 1234 (number). Multiply the text version by 1 to convert:
=VALUE(A2). - Looking in the wrong column. VLOOKUP only looks to the right of the key. If your key is in column C and you want column A, you need XLOOKUP or INDEX/MATCH.
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:
- Misspelled function (
=VLOKUPinstead of=VLOOKUP). - Text in the formula not in quotes:
=IF(A2=apple, ...)should be=IF(A2="apple", ...). - A named range that no longer exists — someone deleted the underlying name.
- A custom function from an add-in that isn't loaded on this PC.
- A newer function (XLOOKUP, FILTER, LET, LAMBDA) opened in older Excel that doesn't support it.
#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:
SQRTof a negative number → wrap inABSif appropriate.LOGof zero or negative → check inputs.IRRthat can't converge → supply a guess:=IRR(range, 0.1).- Any calculation overflowing Excel's number range (~1.8 × 10^308) → restructure the formula.
#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:
- Press Ctrl + F, search the workbook for
#REF!, identify every affected formula. - For each one, decide what it should point to and rewrite the reference.
- 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:
- SUM including a cell that contains a text string. Use SUMIF with a numeric criterion, or clean the data first.
- Date arithmetic where one cell isn't actually a date (it's text that looks like a date).
- Array operation where the operand ranges are different sizes.
- A formula where a "blank" cell actually contains a space character (
=LEN(A2)returns 1 instead of 0).
#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:
- Clear the cells blocking the spill.
- Move the formula somewhere with empty space below or to the right.
- If you only wanted one value, wrap the call in
SINGLEor use the@operator:=@FILTER(...).
#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.