Fix it now
An error value is the calculation engine naming a specific fault, not file damage. The workbook is fine; one formula, or one cell it reads, is wrong, and the value tells you which kind of wrong.
- Click the cell showing the error and read the formula bar. The value gives you the category before you look at anything else.
- With the cell selected, use Formulas, Formula Auditing, Evaluate Formula and click Evaluate repeatedly. The step at which the result turns into an error is the broken part.
- If the error appeared the moment you deleted rows, columns or a sheet, press Ctrl+Z now. #REF! is written permanently into the formula text and undo is the only thing that restores the original address.
- For #VALUE!, compare
=COUNT(range)with=COUNTA(range)over the cells the formula reads. A lower COUNT means some entries are text rather than numbers. - For #NAME?, check every function spelling, then open the Name Manager and confirm each defined name in the formula still exists.
- To find every error at once, press F5, choose Special, select Formulas and untick everything except Errors.
Two of the six are structural and four are data-driven. Tidying the data will not fix #REF! or #NAME?, and rewriting the formula will not fix a column of numbers stored as text.
If Go To Special finds no error cells and the totals check out, you are done. The next section explains what each value reports and why the cell you are looking at is often not the one at fault.
Why it happens
Excel resolves references, converts arguments to the types each function expects, then performs the operation. An error is returned by whichever stage failed, and it propagates: a cell that merely totals ten others shows the same error as the one broken cell inside that range. The cell you are staring at is frequently not the cell at fault, which is why Trace Precedents is worth learning before anything else.
Two values are structural. Microsoft describes #REF! as showing when a formula refers to a cell that is not valid, and it is the harsher of the two: when you delete the cells a formula points at, Excel writes the token into the formula text and the original address is gone from the file. #NAME? means Excel does not recognise text in a formula – most often a typo in a function name, but also a defined name that does not exist, missing quotation marks around a text value, a range reference missing its colon, or a function that needs an add-in which is not enabled.
The other four are data-driven. Microsoft’s own summary of #VALUE! is that there is something wrong with the way the formula is typed, or with the cells it references, and the documented causes go well beyond obvious type mismatches: hidden spaces and characters that make a cell look blank, dates stored as text, leading spaces before dates, and broken connections to external data. #DIV/0! is exactly what it says – a number divided by zero, or by a cell containing zero or nothing.
#N/A generally indicates that a formula cannot find what it has been asked to look for, and it is often not an error at all: a lookup reporting an absent value, or the NA function entered deliberately as a placeholder. #NUM! appears when a formula or function contains numeric values that are not valid, which covers three quite different things – values typed with currency symbols or commas, iterative functions such as IRR or RATE that cannot find a result, and a result outside the range Excel can represent.
A formula points at something you deleted
You have this one if #REF!, with the token visible in the formula bar where a cell address or sheet name used to be.
- Press Ctrl+Z if the deletion was recent. Excel cannot reconstruct the address any other way.
- Otherwise retype the reference, working out what it should be from the same formula in a neighbouring row.
- Find every occurrence with Ctrl+H, searching for the error token with Look in set to Formulas.
Deleting a worksheet that other sheets reference breaks every dependent formula at once. Move such a sheet into its own workbook rather than deleting it.
The numbers are text
You have this one if #VALUE! from arithmetic, and the suspect cells sit left-aligned while genuine numbers align right.
- Confirm with
=ISTEXT(A2)beside a suspect cell. - Select the column, choose Data then Text to Columns, and click Finish without changing anything, which forces Excel to re-parse each entry.
- If that fails, strip invisible characters with
=VALUE(TRIM(CLEAN(A2))), and=SUBSTITUTE(A2,CHAR(160),"")for the non-breaking spaces web exports leave behind. - Check for dates stored as text as well, which Microsoft lists among the documented causes.
Excel cannot resolve a name in the formula
You have this one if #NAME?, and the formula bar shows a function or word Excel does not recognise.
- Check the function spelling first; Microsoft names a typo in the function name as the top cause.
- Open the Name Manager and confirm every defined name used in the formula still exists and is spelt the same way.
- Check that text values inside the formula are in double quotation marks and that range references have their colon.
- If the function needs an add-in, enable the add-in rather than rewriting the formula.
A division has no usable divisor
You have this one if #DIV/0!, in a column where some rows have a denominator and some do not.
- Make sure the divisor is neither zero nor blank, or point the reference at a cell that is neither.
- Where the data is genuinely unavailable, Microsoft’s own suggestion is to enter #N/A in the divisor cell so the result reads as unavailable rather than as an error.
- To suppress it for a finished report, use
=IF(A3,A2/A3,0)or=IFERROR(A2/A3,0).
Both suppression methods hide every error, not only this one. Confirm the formula is right before you wrap it, or you will be hiding a #REF! as well.
A lookup cannot find its value
You have this one if #N/A on some rows and not others.
- Check for a data type mismatch between the lookup value and the source, such as a number stored as text on one side.
- Check for leading or trailing spaces, which stop an exact match without being visible.
- Confirm the match mode. Approximate match where you wanted exact is a documented cause and produces silent nonsense as often as it produces #N/A.
- Confirm the ranges have matching dimensions where the formula operates over arrays.
Full reference
Reading the symptom back to the fault
| What you did or what you see | Where the fault is |
|---|---|
| The error appeared as you deleted a row, column or worksheet | A formula elsewhere pointed at what you deleted |
| Only cells that read one particular cell are wrong | The fault is upstream; the rest inherit it |
| Figures pasted from a CSV or an export will not sum | They are text that looks numeric |
| The formula works in a colleague’s copy but not yours | A function or defined name your workbook or build lacks |
| A lookup returns #N/A on some rows only | Those keys are absent, or differ by data type or trailing space |
The six values, as Microsoft describes them
| Value | Published description |
|---|---|
#REF! |
A cell reference is not valid; for example, you might have deleted cells that were referred to by other formulas |
#VALUE! |
Your formula includes cells that contain different data types |
#NAME? |
Excel does not recognise text in a formula; a range name or function name could be spelt incorrectly |
#DIV/0! |
A number is divided either by zero or by a cell that contains no value |
#N/A |
A value is not available to a function or formula |
#NUM! |
A formula or function contains invalid numeric values |
A seventh value, #NULL!, appears when you specify an intersection of two areas that do not intersect. It is rare, and it almost always means a space was typed where a comma was meant.
The #NUM! cases people miss
- A value typed with a currency symbol or thousands separators, because commas are reserved for formula syntax.
- An iterative function such as IRR or RATE that cannot find a result after its calculation attempts, which usually means the inputs cannot converge rather than that the formula is wrong.
- A result too large or too small to represent. Excel’s documented range is between -1 x 10 to the power 307 and 1 x 10 to the power 307.
- A function given an argument outside its accepted domain, such as a negative number where a square root is expected.
Hidden characters, in order of likelihood
- Trailing spaces from a copy and paste, which TRIM removes.
- Non-breaking spaces from a web page, character 160, which TRIM does not remove and SUBSTITUTE does.
- Non-printing control characters from an old export, which CLEAN removes.
- A leading apostrophe, which forces text and is invisible in the cell but visible in the formula bar.
- A number formatted as text by the column’s own format, which no formula fixes: change the format, then re-enter or re-parse the values.
Finding and checking the lot
Go To Special with Formulas and only Errors ticked selects every error cell in the sheet at once, which is the fastest audit there is. Do that before and after any fix, and force a full recalculation between the two so nothing is showing a stale cached result. Then spot-check two or three totals against a known figure, because a suppressed error returns a plausible number rather than an obvious one, and plausible is worse.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
#REF! |
A cell reference is not valid, for example because cells the formula referred to were deleted | Microsoft Support |
#VALUE! |
The formula includes cells that contain different data types, or something is wrong with how it is typed | Microsoft Support |
#NAME? |
Excel does not recognise text in the formula; a function or range name is spelt incorrectly or does not exist | Microsoft Support |
#DIV/0! |
A number is divided either by zero or by a cell that contains no value | Microsoft Support |
#N/A |
A value is not available to a function or formula; typically a lookup that cannot find what it was asked for | Microsoft Support |
#NUM! |
A formula or function contains numeric values that are not valid | Microsoft Support |
Confirm the fix worked
- Go To Special with Formulas and only Errors ticked finds no cells.
- A full recalculation has been forced, so nothing is showing a stale cached result.
- Two or three totals match a known figure, in case a suppressed error now returns a plausible but wrong number.
- Saving, closing and reopening the workbook does not bring the errors back on load.
- Any IFERROR you added wraps a formula you have confirmed is correct, not one you have not checked.
Questions people ask about this
Do I need a newer Excel or a different licence to fix these?
No. The six error values behave identically in every version and edition, and every tool named above ships in the product. The only version-sensitive case is a #NAME? where the formula bar shows an _xlfn. prefix in front of a function your build does not have.
Can I hide the errors so the report looks clean?
You can, with IFERROR or a conditional format, and that is legitimate on a finished dashboard. Do it only once you know why the error occurred, because a hidden #REF! turns a broken model into one that produces confident, wrong numbers.
Why does one cell error while an identical cell beside it is fine?
Because the fault is in the data. Relative references mean each row reads different cells, so one text entry among numbers affects only the rows that touch it.
Is #N/A always a problem?
No. Microsoft describes it as a formula not finding what it was asked to look for, and entering it deliberately as a placeholder for unavailable data is a documented technique. It is only a problem when you expected a match.
Excel flags cells with green triangles that are not errors. Can I stop that?
Yes. Those come from background error checking, which is separate from error values and flags anything it considers suspicious. Turn individual rules off under File, Options, Formulas.
