When a formula can’t produce a proper result, Excel shows an error value in the cell instead of a number or text. Every error value starts with # and has a short code, such as #VALUE! or #N/A. The code is a clue to the kind of problem, not an exact diagnosis. This guide covers the common error messages, what usually triggers each one, and how to track down the source.
The common error values at a glance
| Error | What it usually means | Where to start |
|---|---|---|
#VALUE! |
A value is the wrong type for the formula, often text where a number is needed | Look for text that looks like a number |
#DIV/0! |
The formula divides by zero or by an empty cell | Check the divisor |
#N/A |
A lookup found no match, or a value is marked as not available | Check the lookup value and the lookup range |
#NAME? |
Excel doesn’t recognize a function, a name, or unquoted text | Check spelling, quotation marks and named ranges |
#REF! |
A formula points to a cell, range or sheet that no longer exists | Check for deleted rows, columns or sheets |
#NUM! |
A number is not valid for the calculation | Check the inputs for values the function can’t use |
#NULL! |
Two ranges that should overlap in a formula don’t | Check the space between range references |
#SPILL! |
A dynamic array formula can’t fill the cells it needs | Clear the cells in its way |
#CALC! |
A dynamic array formula returns no results | Check the criteria and any empty-result setting |
Errors caused by the values
#VALUE!, #DIV/0! and #NUM! usually come from the numbers, text or dates a formula works with. Adding a number to a word gives #VALUE!. Dividing by an empty cell gives #DIV/0!. Taking the square root of a negative number gives #NUM!.
If #VALUE! is the one you’re facing, learning how to fix #value error in excel is the next step. For #DIV/0!, you get to choose what the cell shows when there is nothing to divide, and see how to get rid of #div/0 error in excel for the options.
Errors about lookups and references
#N/A appears when a lookup function can’t find its value. VLOOKUP, MATCH and XLOOKUP are the usual sources. The lookup mistakes behind it are covered in what does #n/a mean in excel.
#REF! appears when a formula refers to a cell, range or sheet that has been removed. Deleted cells, a column number that’s too large, and broken links are the usual causes. For the steps, see how to fix #ref error in excel.
#NULL! is rare. It shows up when a space sits between two ranges that don’t overlap, because a space is Excel’s intersection operator. For example, =SUM(A1:A5 C1:C5) returns #NULL!, while =SUM(A1:A5,C1:C5) adds both ranges.
Errors about names
#NAME? means Excel doesn’t recognize something in the formula. The usual causes are a misspelled function, text typed without quotation marks, or a named range that doesn’t exist. Newer functions can also show #NAME? in older versions of Excel. For a checklist of causes, see “why does excel show #name error.”
Errors from dynamic arrays
Newer versions of Excel have dynamic array formulas, and some of them return several results that fill the cells beside them. #SPILL! appears when those results can’t fit because something is in the way. #CALC! appears when a dynamic array formula has nothing to return. FILTER with no matching rows is one example.
Excel’s #SPILL! error has its own causes and fixes, which are covered in how to fix #spill error in excel.
What about #####?
##### is not an error value. It means the column is too narrow to display the number, date or time in the cell. Widen the column to see the value. Excel also shows ##### when a date or time would be negative.
Finding the cause
Excel has several tools for tracking an error down:
- Error warning. A cell with an error can show a small warning icon. Click it to see the error’s meaning and options such as Trace Error.
- Error Checking. On the Formulas tab, Error Checking moves through the sheet and steps you through each problem it finds.
- Evaluate Formula. Also on the Formulas tab, this shows each step of a formula and the result of each step. How to use evaluate formula in excel explains it in detail.
- Trace Precedents. This draws arrows from the cells a formula uses to the formula itself. For the process, see how to trace precedents in excel.
A formula can also give a wrong answer with no error code at all. That’s a separate problem, and why is my if formula not working in excel covers one common version of it.
Handling errors on purpose
Sometimes a blank or a short message reads better than an error code. IFERROR and IFNA can replace an error with a value you choose. They can also hide real problems, such as a misspelled name that quietly returns zero. Fix the cause first, and use these functions when you’re sure a blank or a placeholder is the right answer. Learning how to hide errors in excel formulas is useful, but it works best once you know what is causing the error.
Google Sheets
Google Sheets uses many of the same codes, including #N/A, #REF!, #DIV/0! and #NAME?. Its general-purpose error is #ERROR!. Syntax problems in Sheets show up as a formula parse error instead, and the causes and fixes for that are different. If that’s the message you see, the guide on google sheets formula parse error covers it.
A checklist
- Click the cell and read the formula.
- Match the code to the likely causes above.
- Check each input one piece at a time.
- Fix the source, not just the symptom.
- Decide last whether the error should be hidden.