Error Types
Note: This page is in construction 🚧
The result of a formula is sometimes an error. In some situations those errors are expected and your formulas might be dealing with them. The error #N/A
might signal that there is no data to evaluate the formula yet. Maybe the payrol has not been introduced for that month just yet.
Some other errors like #SPILL!
, #CIRC!
or #ERROR!
signal an error in your spreadsheet logic and must be corrected.
The first kind of errors or 'common errors' are found in other spreadsheet engines like Excel while other errrors like #ERROR!
or #N/IMPL
are particular to IronCalc.
Common Errors
#VALUE!
It might be caused by mismatched data types (e.g., text used where numbers are expected):
5+"two"
The engine doesn't know how to add the number 5
to the string two
resulting in a #VALUE!
.
It is an actual error in your spreadsheet. It indicates that the formula isn’t working as intended.
#DIV/0!
Division by zero or an empty cell.
=1/0
Usually this is an error. However, in cases where a denominator might be blank (e.g., data not yet filled in), this could be expected. Use IFERROR
or IF
to handle it.
=IF(B1=0, "N/A", A1/B1)
#NAME?
Found when a name is not recognized. Maybe a misspeled name for a function. Could be a referenceto defined name that has been deleted.
=UNKOWN_FUNCTION(A1)
This indicates an error in your spreadsheet logic.
#REF!
Indicates an invalid cell reference, often from deleting cells used in a formula.
They can appear as a result of a computation or in a formula. Examples:
=Sheet34!A1
If Sheet34
doesn't exist it will return #REF!
This is a genuine error. It indicates that part of your formula references a cell or range that is missing.
#NUM!
Invalid numeric operation (e.g., calculating a square root of a negative number).
Adjust the formula to ensure valid numeric operations.
Sometimes a #NUM!
might be expected signalling the user that some parameter is out of scope.
#N/A
A value is not available, often in lookup functions like VLOOKUP.
This is frequnly not an error in your spreadsheetlogic.
You can produce a prettier answer using the IFNA
formula:
=IFNA(VLOOKUP(A1, B1:C10, 2, FALSE), "Not Found")
#NULL!
Incorrect range operator in a formula (e.g., missing a colon between cell references).
#SPILL!
A cell in a formula will overwrite content in other cells. This cannot happen riht now in IronCalc as formulas don't spill yet.
#CIRC!
Circular reference. This is an error is your spreadsheet and must be fixed. Means that during teh course of a computation a circular dependency was found.
A circular dependency is a dependency of a formula on itself.
For instance in the cell A1
the formula =A1*2
is a circular dependency.
Other spreadsheet engines use circular dependencies to do "loop computations", run "sensitivity analysis" or "goal seek".
IronCalc doesn't support any of those at the moment.
IronCalc specific errors
#ERROR!
General formula issue, like syntax errors or invalid references. In general Excel does not let you enter incorrect formulas but IronCalc will.
This will make your workbook imcompatible with Excel
For instace an incomplete formula
=A1+
#N/IMPL!
A particular feature is not yet implemented in IronCalc
Look if there is a Github ticket or contact us via email, Discord or bluesky
Error propagation
Some errors a created by some formulas. For instance the function SQRT
can create the error #NUM!
but can't ceate the error #DIV/0
.
Once an error is created it is normally propagated by all the formulas. So if cell C3
evaluates to #ERROR!
then the formula =SQRT(C3)
will return #ERROR!
.
Not all functions propagate errors in their arguments. For instancethe function IF(condition, if_true, if_false)
will only propagate an error in the if_false
argument if the condition
is FALSE
. This is called lazy evaluation, the function IF
is lazy, it only evaluates the arguments when needed. The opposite of lazy evaulaution is called eager evaluation.
Some functions also expect an error as an argument like ERROR.TYPE
and will not propagate the error.
See also
The following functions are convenient when working with errors
ISERR(ref)
,TRUE
ifref
is any error type except the#N/A
error.ISERROR(ref)
,TRUE
ifref
is any error.ISNA(ref)
,TRUE
if ref is#N/A
.ERROR.TYPE
returns the numeric code for a given error.IFERROR(ref, value)
returnsvalue
if the content ofref
is an error.IFNA(ref, value)
returnvalue
ifref
is #N/A errors only.