New: 6 free SQL practice datasets with 300+ questions — try the SQL Compiler →
Excel

Excel Errors: #N/A, #VALUE!, #REF! and How to Fix

Excel errors explained: what #N/A, #VALUE!, #REF!, #NAME? and #DIV/0! mean, how to fix them, IFERROR vs IFNA and formula auditing tools, with real results.

Upskly AI Team September 27, 2026 12 min read
Excel Errors: #N/A, #VALUE!, #REF! and How to Fix

An Excel error value is a special result that starts with a hash sign, such as #N/A or #REF!, and tells you the formula could not produce a normal answer. Each error names a different problem: #DIV/0! is a division by zero, #N/A means a lookup found nothing, #VALUE! means a wrong type of value, #REF! means a cell reference is no longer valid, and so on. Formula auditing is the set of tools and habits for finding why a formula gives an error or a wrong number.

This guide lists every error with a formula that produces it, explains what usually causes each, shows how errors spread from cell to cell, when to hide them and when not to, and how to trace a problem through a workbook. Every result was produced by running the formula in Microsoft Excel.

In this guide

The short version

  • Read the error name first: it points at the cause. #N/A not found, #VALUE! wrong type, #REF! deleted or invalid reference, #NAME? unknown name or typo, #DIV/0! divide by zero, #NUM! impossible number.
  • An error inside a range poisons SUM. AGGREGATE(9, 6, range) skips errors.
  • IFERROR hides every error, including your own mistakes. Use IFNA for lookups.
  • Use Evaluate Formula and Trace Precedents to find where a wrong number starts.

Every error value at a glance

Each formula below produces exactly one error, typed into a small worksheet where A1:B3 hold the numbers 1 to 6:

The error values
FormulaExcel showsWhy
=1/0#DIV/0!#DIV/0!: division by zero
=NA()#N/A#N/A: value not available, the error a lookup gives when it finds nothing
=SUMM(1,2)#NAME?#NAME?: Excel does not recognise SUMM (a mistyped function name)
=SUM(A1:A2 B1:B2)#NULL!#NULL!: a space means intersection, and A1:A2 and B1:B2 share no cells
=SQRT(-1)#NUM!#NUM!: an impossible number, here the square root of a negative
=#REF!+1#REF!#REF!: an invalid reference
="a"+1#VALUE!#VALUE!: text where a number is needed
=FILTER(A1:A3,A1:A3>100)#CALC!#CALC!: a dynamic array result with nothing in it

Two more you may see. #SPILL! appears when a dynamic array formula is blocked by something in its way:

A1 holds =SEQUENCE(3) but A2 contains an x
A
1#SPILL!
2x
3

And a row of hash signs is not an error. It means the column is too narrow to show a number or date. Widen the column and the number is there:

A1 holds 123456789 in a narrow column; B1 is a real #DIV/0! error
AB
1######DIV/0!

What causes each error

These formulas show typical situations. A1 holds 10, B1 holds 0, C1 is empty, D1 holds the text abc and E1 holds a text with just a space:

Typical causes
FormulaExcel showsWhy
=A1/B1#DIV/0!dividing by a zero
=A1/C1#DIV/0!dividing by an empty cell counts as dividing by zero
=A1+D1#VALUE!adding a number and the text abc
=A1+E1#VALUE!a cell that looks empty but holds a space
=SUM(A1,D1)10SUM skips text in referenced cells, so no error
=A1&D110abcjoining with & never gives #VALUE!: the number becomes text
=VLOOKUP(10,A1:B1,3,FALSE)#REF!the key 10 is found, but column 3 does not exist in a two-column table: #REF!
=VLOOKUP(5,A1:B1,2,FALSE)#N/Athe key 5 is not in the first column: #N/A
=IF(D1=abc,1,0)#NAME?abc without quotes is read as a name, which does not exist
=IF(D1="abc",1,0)1with quotes it is text, and the test works
=10^400#NUM!the result is too big for Excel to hold
=LN(0)#NUM!the logarithm of zero is undefined
=A1+""#VALUE!

#REF!: a reference that no longer exists

The classic cause is deleting a row, column or sheet that a formula points at. Here B1 held =A2*2 and row 2 was deleted:

Before: B1 holds =A2*2

AB
11040
220
330

What is inside the cells before the deletion

AB
110=A2*2
220
330

After deleting row 2

AB
110#REF!
230

B1 now points at nothing

AB
110=#REF!*2
230

Undo the deletion (Ctrl + Z) if you can. If you cannot, retype the reference. A VLOOKUP column number that is too big also gives #REF!, as the table above shows.

How errors spread

An error in one cell makes every formula that reads it an error too, and when two different errors meet, the first one Excel reads is the one you see. A1 holds 10, A2 holds =NA() and A3 holds =1/0:

Errors meeting in a formula
FormulaExcel showsWhy
=A2+A3#N/A#N/A is read first
=A3+A2#DIV/0!swap the order and #DIV/0! is read first
=SUM(A1:A3)#N/Aone error in the range spoils the whole SUM (the first error in the range order)
=SUM(A3,A2)#DIV/0!the argument order decides again
=AGGREGATE(9,6,A1:A3)10function 9 is SUM, option 6 says ignore errors: only the 10 is added
=IFERROR(SUM(A1:A3),0)0IFERROR replaces the whole error with a value
=SUMIF(A1:A3,">5")10SUMIF only looks at cells that meet the criterion, and an error does not
=COUNT(A1:A3)1COUNT counts only real numbers
=COUNTA(A1:A3)3COUNTA counts errors as filled cells
=ISERROR(A2)TRUEany error
=ISNA(A2)TRUEonly #N/A
=ISNA(A3)FALSE
=ISERR(A2)FALSEISERR is TRUE for every error except #N/A
=ISERR(A3)TRUE
=ERROR.TYPE(A2)7ERROR.TYPE turns an error into a number: 7 is #N/A
=ERROR.TYPE(A3)22 is #DIV/0!
=ERROR.TYPE(A1)#N/Ano error, so ERROR.TYPE itself returns #N/A
ERROR.TYPE codes
ErrorERROR.TYPE
#NULL!1
#DIV/0!2
#VALUE!3
#REF!4
#NAME?5
#NUM!6
#N/A7

Handling errors: IFERROR, IFNA and friends

IFERROR(value, if_error) replaces any error with the value you choose. That is exactly its danger: it also replaces the errors that tell you the formula is broken. IFNA replaces only #N/A, the error that means not found. The formula below has a bug: the column number 3 does not exist in the two-column table. Watch what each function does with it:

IFERROR hides a real bug
FormulaExcel showsWhy
=IFERROR(VLOOKUP(101,A1:B2,3,FALSE),"not found")not foundthe bug is hidden: it looks like a legitimate not-found
=IFNA(VLOOKUP(101,A1:B2,3,FALSE),"not found")#REF!IFNA lets #REF! through, so you see the bug
=IFERROR(VLOOKUP(999,A1:B2,2,FALSE),"not found")not founda genuine miss: both show the message
=IFNA(VLOOKUP(999,A1:B2,2,FALSE),"not found")not foundIFNA handles the normal case
=VLOOKUP(101,A1:B2,2,FALSE)Ashathe correct formula

The habit: use IFNA around lookups, use IF to guard a specific problem (for example IF(B1=0, "", A1/B1)), and keep IFERROR for cases where any failure really should show a fallback.

Blank cells versus empty text

A truly empty cell and a formula that returns empty text (="") look the same, but they behave differently in arithmetic. A1 is empty and A2 holds the formula ="":

Empty cell versus empty text
FormulaExcel showsWhy
=10/A1#DIV/0!an empty cell counts as zero: #DIV/0!
=10/A2#VALUE!empty text is text, not zero: #VALUE!
=A1+11an empty cell counts as zero in arithmetic
=A2+1#VALUE!empty text cannot be added
=10/N(A2)#DIV/0!N() turns text into 0, so we get a division by zero
=SUM(A1:A2)0SUM skips text

So a formula chain that returns "" in some rows can produce #VALUE! in the next column. Test with A2="" before you calculate, or use N().

Circular references

A circular reference is a formula that depends on its own result, directly or through other cells. Excel warns you, cannot calculate it, and shows 0 (unless iterative calculation is switched on, which you rarely want):

=A1+1 typed in A1
A
10
A1 =B1 and B1 =A1: a loop through two cells
AB
100
=SUM(A1:A5) typed in A5, which is inside its own range
A
11
22
33
44
50

The status bar shows the address of one cell in the loop, and Formulas, Error Checking, Circular References lists them. The usual fix is to change the range so it does not include the formula’s own cell, for example SUM(A1:A4).

Formula auditing tools

When a formula gives a wrong number, or an error you cannot explain, work backwards from the result. The tools are on the Formulas tab:

Where to find the auditing tools
ToolWhat it doesShortcut or place
Show Formulasdisplays every formula instead of its resultCtrl + ` (backtick)
Trace Precedentsdraws arrows from the cells a formula readsFormulas, Trace Precedents; Ctrl + [ selects them
Trace Dependentsdraws arrows to the cells that read this cellFormulas, Trace Dependents; Ctrl + ] selects them
Trace Errorfollows an error back towards the cell that started itFormulas, Error Checking, Trace Error
Evaluate Formulasteps through a formula one calculation at a timeFormulas, Evaluate Formula
F9 on a selectionreplaces the selected part of a formula with its value, to see it (press Esc to undo)in the formula bar
Error Checkingflags common problems with a green triangleFormulas, Error Checking
Go To Specialselects all cells that hold formulas, errors, constants or blanksF5, Special
Watch Windowkeeps chosen cells visible while you work elsewhereFormulas, Watch Window

Two functions read a formula for you. FORMULATEXT shows another cell’s formula as text, and ISFORMULA tells you whether a cell holds one. A1 holds 5 and B1 holds =A1*2:

Reading formulas with formulas
FormulaExcel showsWhy
=FORMULATEXT(B1)=A1*2the formula in B1 as text
=ISFORMULA(B1)TRUE
=ISFORMULA(A1)FALSEa constant
=ISFORMULA(C1)FALSEan empty cell

A simple routine that solves most problems: select the cell, look at the formula bar, use Evaluate Formula to find the step where the value goes wrong, then check the inputs with Trace Precedents. Look for text that looks like numbers, hidden spaces and ranges of the wrong size before you suspect anything more exotic.

Common mistakes

Mistake 1: wrapping everything in IFERROR

It makes the sheet look clean and hides the bug. Keep errors visible while you build, and add handling for the specific case afterwards.

Mistake 2: ignoring #N/A because it looks harmless

A lookup that returns #N/A for a key that seems to be in the list usually means a text-versus-number mismatch or a hidden space, which affects real data.

Mistake 3: deleting rows without checking references

Before you delete a row, column or sheet, use Trace Dependents to see what reads it. A #REF! inside a formula is hard to repair after the fact.

Mistake 4: confusing a hash row with an error

A cell full of hash signs is a width problem. Double-click the column border to fit it.

Cheat sheet

Error cheat sheet
ErrorUsual causeFirst thing to check
#DIV/0!divisor is zero or emptyIF(B1=0, "", A1/B1)
#N/Alookup found nothingtext versus number, spaces, exact match
#VALUE!wrong type, such as text in a calculationcells with a space or text, empty text ""
#REF!deleted or invalid referenceCtrl + Z, or retype; column number in VLOOKUP
#NAME?misspelled function or name, text without quotesspelling, quotes, function available in your version
#NUM!impossible numberSQRT of a negative, LN of zero, huge results
#NULL!a space between two rangesuse a comma or a colon
#SPILL!something blocks the resultclear the cells below and beside
#CALC!an empty array resultthe FILTER if_empty argument
#####column too narrowdouble-click the column border

Try it yourself

Work out each answer first, then open the solution.

1. A1 holds 10, A2 holds =NA() and A3 holds =1/0. What does =SUM(A1:A3) show, and which formula gives the total of the numbers only?

Show solution

=SUM(A1:A3) shows #N/A, the first error in the range. =AGGREGATE(9,6,A1:A3) shows 10, because option 6 ignores errors.

2. A1:B2 hold 101, Asha, 102 and Ravi. =VLOOKUP(101, A1:B2, 3, FALSE) shows an error. Which one, and why?

Show solution

It shows #REF!, because the table has only two columns and the formula asks for column 3. =IFNA(VLOOKUP(101,A1:B2,3,FALSE),"not found") lets that error through instead of hiding it, and the correct formula returns Asha.

3. D1 holds the text abc. =IF(D1=abc, 1, 0) shows #NAME?. Fix it.

Show solution

Put the text in quotes: =IF(D1="abc", 1, 0). Without quotes Excel reads abc as the name of something, and no such name exists. The corrected formula returns 1.

4. A1 holds =NA(). Which of ISERROR, ISNA and ISERR return TRUE?

Show solution
A1 holds #N/A
FormulaExcel shows
=ISERROR(A1)TRUE
=ISNA(A1)TRUE
=ISERR(A1)FALSE

ISERR is TRUE for every error except #N/A, which makes it useful for finding real problems in a lookup column.

Frequently asked questions

What do the different error values mean in Excel?

#DIV/0! division by zero, #N/A value not available (a lookup found nothing), #NAME? unknown function or name, #NULL! ranges that do not intersect, #NUM! impossible number, #REF! invalid cell reference, #VALUE! wrong type of value, #SPILL! a blocked array result, and #CALC! an empty array.

How do I fix the #N/A error in Excel?

Find out why the lookup missed: a text-versus-number mismatch, a hidden space, a value that really is missing, or an approximate match on an unsorted list. If it is a real miss, handle it with IFNA or the not-found argument of XLOOKUP.

Why does Excel show #VALUE!?

A formula received the wrong kind of value, for example text in an addition. Check for cells with spaces or text, and for formulas that return empty text.

What causes #REF! in Excel?

A formula refers to a cell that no longer exists, usually because a row, column or sheet was deleted, or a VLOOKUP column number is larger than the table.

What is the difference between IFERROR and IFNA?

IFERROR replaces every error. IFNA replaces only #N/A, so other errors still show and reveal mistakes.

How do I sum a range that contains errors?

Use =AGGREGATE(9, 6, range) to ignore the errors, or fix the cells that produce them. SUM returns the first error in the range.

How do I find a circular reference?

Look at the address in the status bar, or use Formulas, Error Checking, Circular References. Then change the formula so it does not include its own cell.

How do I see what a formula is doing step by step?

Select the cell and use Formulas, Evaluate Formula. To test a part of a long formula, select it in the formula bar and press F9, then Esc to undo.

Test yourself

Timed questions on Errors and Formula Auditing, with an explanation for every answer.

Take the Quiz
Upskly AI Team
Learning made simple
Scroll to Top