Every Excel Error Explained (and How to Fix Them)
Introduction
Excel has seven error codes. Here's what each one means and how to fix it.
Quick Reference
| Error | Meaning | Typical Cause |
|---|---|---|
| #DIV/0! | Can't divide | Denominator is zero or blank |
| #VALUE! | Wrong input type | Math on text, hidden characters |
| #REF! | Missing reference | Deleted row, column, or sheet |
| #NAME? | Unrecognized name | Typo in function, missing quotes |
| #N/A | No match found | Lookup value doesn't exist |
| #NULL! | Bad range operator | Space where a colon or comma should be |
| #NUM! | Invalid number | Impossible math or result too large |
#DIV/0!
#DIV/0! shows up when a formula divides by zero or by an empty cell, especially in formulas that calculate rates or percentages.
If B2 is 0 or blank:
=A2/B2
Check the denominator first to avoid it:
=IF(B2=0, 0, A2/B2)
#VALUE!
#VALUE! means a formula got the wrong type of input. If A2 contains "Sales":
=A2 + 100
Excel can't add a number to a word, so it throws #VALUE!.
Watch out for invisible characters too. A cell might look numeric but contain a hidden space or non-breaking character from pasted data. If you can't see why a formula is throwing #VALUE!, click the cell and check the formula bar. VALUE() forces a conversion:
=VALUE(A2) + 100
#REF!
You'll usually see #REF! right after deleting a row, column, or sheet that a formula depends on.
Say C2 contains =A2 + B2. Delete column B and the formula becomes:
=A2 + #REF!
Ctrl + Z undoes the deletion if you catch it in time. To avoid this entirely, press Ctrl + ] before deleting anything. It highlights every cell that depends on the selected one, so you can see what will break.
#NAME?
Two things cause #NAME? almost every time: a misspelled function or missing quotes.
A misspelled function:
=VLOKUP(A2, D2:E10, 2, FALSE)
Use the autocomplete dropdown as you type to catch these before you press Enter.
Missing quotes around text:
=SUMIF(A2:A10, Apples, B2:B10)
Without quotes, Excel reads Apples as a named range. If none exists, you get #NAME?. Add the quotes:
=SUMIF(A2:A10, "Apples", B2:B10)
#N/A
#N/A means a lookup function searched a range and found nothing. VLOOKUP, XLOOKUP, and INDEX/MATCH all return it when there's no match.
=VLOOKUP("Widget X", A2:C10, 3, FALSE)
If "Widget X" isn't in column A, the result is #N/A.
Sometimes the value looks like it's there but still won't match. This usually comes down to trailing spaces, number-vs-text formatting, or invisible characters. A cell showing "100" stored as text won't match the number 100. TRIM() and VALUE() clean up most of these. XLOOKUP also lets you handle missing matches inline:
=XLOOKUP("Widget X", A2:A10, C2:C10, "Not found")
#NULL!
#NULL! is rare. It shows up when you put a space between two references instead of a colon or comma:
=SUM(A1 B2)
The space tells Excel to find the intersection of A1 and B2. Since single cells don't intersect, you get #NULL!. Use a colon for a range or a comma to list separate cells:
=SUM(A1:B2)
=SUM(A1, B2)
#NUM!
#NUM! means a formula produced a number that Excel can't represent, or received an input that doesn't work mathematically.
=SQRT(-1)
No real square root of a negative number. You'll also see this from financial functions like IRR when cash flows don't converge, or when a result exceeds Excel's limit of roughly 1.8 x 10^308. For IRR, supplying a guess argument often helps.
Conclusion
Each error code has a specific cause and a direct fix. When errors are unavoidable because of missing or messy data, IFERROR can catch and replace them for you. Check out our IFERROR guide to see how it works.
Level up your Excel skills
Bite-sized lessons, drills, and daily challenges to build real spreadsheet skills.