Sub topic 6
Reading Excel error values
This chapter assumes you can write formulas with cell references, know the difference between absolute and relative references, and have seen a three-statement model layout. It also assumes you can use Trace Precedents from the earlier chapters. Here you learn what each Excel error value means, what usually causes it in a financial model, and how to decide whether to fix it, expose it, or handle it.
Why error values matter in an audit
An error value is Excel's way of saying a formula cannot return a valid result. In a model, one error rarely stays where it starts. A formula that depends on an error cell also returns an error. The error then spreads through the calculation chain until it reaches the outputs, such as net income, free cash flow, or valuation.
This has two consequences for an auditor:
- The error you see in an output is usually not where the problem began. The cell where the error first appears is the source.
- A hidden error is worse than a visible one. Some errors are suppressed by wrapping formulas in
IFERROR, and the model then shows a plausible but wrong number.
The next chapter covers Trace Error, which finds the source. This chapter focuses on reading the error and forming a hypothesis about its cause.
The seven error values
Excel has seven error values that appear in normal use. All begin with #. Excel also has #SPILL!, #CALC! and similar errors in dynamic-array versions, but the seven below cover most models.
| Error | Meaning | Typical cause in a model |
|---|---|---|
| `#DIV/0!` | Division by zero or an empty cell | Growth rate or margin where the prior-year value is 0 or blank |
| `#REF!` | A reference is no longer valid | A row, column, or sheet that a formula pointed to was deleted |
| `#N/A` | A value is not available | A lookup finds no match, or a formula returns `NA()` on purpose |
| `#VALUE!` | The wrong type of value | Text used in arithmetic, such as a number stored as text |
| `#NAME?` | Excel does not recognize a name | A misspelled function or range name, or a deleted named range |
| `#NUM!` | A number is invalid for the operation | `IRR` that cannot converge, or a square root of a negative number |
| `#NULL!` | Two ranges do not intersect | A space typed where a comma or colon was intended |
#DIV/0!
This is the most common error in financial models. It appears in ratios and growth rates, especially in the first forecast period or for a line item that has no history.
=D12/C12If C12 is 0 or empty, the result is #DIV/0!. Before fixing it, ask why C12 is zero. Sometimes zero is correct, as with a new product that had no revenue last year. Sometimes it signals a broken link upstream.
A defensible fix makes the problem visible instead of burying it:
=IF(C12=0, NA(), D12/C12)This returns #N/A when the denominator is zero. The #N/A is deliberate and traceable. Charts also skip #N/A points instead of plotting them as zero. If you prefer a blank, =IF(C12=0, "", D12/C12) works, but a blank string is text, and any later formula that does arithmetic on it returns #VALUE!.
#REF!
#REF! means a formula lost the cell it pointed to. The formula text itself shows the damage:
=SUM(C5:C7)+#REF!The usual cause is deleting a row, column, or sheet that other formulas used. An auditor should treat #REF! as a structural defect, not a data issue. You cannot fix it by editing the number. You must restore the reference, which sometimes means undoing the deletion if the file is still open, or rebuilding the link from a backup.
A #REF! can also sit inside a formula that does not currently display an error. For example, =IFERROR(A1+#REF!, 0) returns 0. Search for it directly: press Ctrl+F, enter #REF!, set Look in to Formulas, and choose Find All.
#N/A
#N/A means "not available." It has two very different origins:
- Intentional. A modeler uses
NA()to mark a value as missing, as in theIFexample above. - Accidental. A lookup such as
VLOOKUP,XLOOKUP, orMATCHcould not find its key.
For the accidental case, the usual causes are a mismatch in text (a trailing space, different capitalization is not an issue but extra spaces are), a number stored as text on one side of the lookup, or an approximate match used where an exact match was needed. A frequent bug is the VLOOKUP default of approximate match when the fourth argument is omitted. Always check that exact-match lookups specify exact matching:
=VLOOKUP(B5, Assumptions!$B$4:$F$20, 3, FALSE)#VALUE!
#VALUE! appears when a formula expects one type and gets another. The common case in models is a number stored as text, for example a value pasted from a report or a cell with a leading apostrophe. Text on the left side of the cell, or a green triangle, often gives it away.
=C5*D5If D5 holds the text "1,250", this returns #VALUE!. Note that =C5+D5 may sometimes coerce the text and succeed, while SUM(C5:D5) ignores the text entirely and returns a wrong total with no error. This inconsistency is why a number stored as text is dangerous even when no error appears.
#NAME?
Excel returns #NAME? when it reads something in a formula as a name and cannot find it. Check three things:
- A function name is misspelled, such as
SUMIFF. - A named range was deleted or renamed, so formulas using it break.
- A function is not available in the user's Excel version, such as
XLOOKUPopened in Excel 2016.
Open Formulas > Name Manager to see which names exist and what each refers to.
#NUM!
#NUM! means the arithmetic itself is not possible, or an iterative function failed. In financial models it most often comes from IRR, XIRR, or RATE:
=IRR(C20:H20)IRR needs at least one negative and one positive cash flow. If every value is positive, or the series is all zero, it returns #NUM!. When it does converge poorly, supplying a guess as the second argument sometimes helps. Treat a #NUM! in a return metric as a prompt to inspect the cash flows feeding it.
#NULL!
#NULL! is rare. Excel treats a space between two references as the intersection operator, so =SUM(A1:A5 C1:C5) asks for cells common to both ranges. If the ranges do not overlap, the result is #NULL!. The cause is nearly always a typing error, a space instead of a comma.
How errors propagate
The diagram shows a single error spreading through a simple chain.
The valuation shows an error, but the fix belongs at the margin cell, or at the zero input that caused it. Fixing the end of the chain only hides the symptom.
Counting errors with a formula
A model should report its own errors. To count every error cell in a range, use ISERROR inside SUMPRODUCT:
=SUMPRODUCT(--ISERROR(C5:N80))ISERROR returns TRUE or FALSE for each cell. The double minus converts those to 1 and 0, and SUMPRODUCT adds them. A result of 0 means no errors in that range. Pick a range that covers the whole model area, and extend it when you add rows.
Note that ISERROR also counts intentional #N/A values. If your model uses NA() on purpose, use ISERR, which ignores #N/A, or count the two groups separately so intentional markers do not trigger false alarms.
The IFERROR trap
IFERROR(value, fallback) replaces any error with the fallback. It is convenient, and it is a common source of hidden mistakes:
- It catches every error type, including
#REF!and#NAME?, which are bugs and not expected conditions. - The fallback is often 0, which is a legitimate number that flows into later totals.
- It removes the trail that Trace Error and the error count depend on.
When you audit, search for IFERROR and ask of each occurrence which error it expects and whether a narrower test would do. For division, IF(C12=0, ..., ...) expresses the expected condition and leaves unexpected errors visible. For lookups, IFNA handles only #N/A.
A reading routine for any error
When you meet an error cell, work through the same short sequence:
- Read the error type and note the likely causes from the table.
- Select the cell and read its formula in the formula bar.
- Check each precedent for its own error or for an unexpected value, such as 0, blank, or text.
- Decide whether the error is expected (a deliberate
NA()), a data problem (zero or text input), or a structural defect (#REF!,#NAME?). - Record the cell address, error type, cause, and the fix in your findings log.
Exercise
A cell contains =IFERROR(VLOOKUP(B5, Assumptions!$B$4:$F$20, 3, FALSE), 0) and returns 0 for a product that should have a price. Which error is probably hidden, what should you check, and what change makes future failures visible?
Show answer
The hidden error is most likely #N/A from a failed lookup, though IFERROR would also mask #REF! or #NAME?. Check whether the key in B5 matches the table exactly, looking for trailing spaces and text versus number mismatches, and confirm the range still covers the product. Replace IFERROR with IFNA, or let the error show, so a missing price is not treated as a valid price of 0.
Exercise
=SUMPRODUCT(--ISERROR(C5:N80)) returns 3, but your model deliberately uses NA() in two cells to mark missing data. How do you tell whether the model has an unintended error?
Show answer
Use ISERR instead of ISERROR, because ISERR ignores #N/A. The count then covers only the other error types. If it returns 1, one unintended error remains. You can also compute the intentional count with ISNA and subtract it.