Documentation/Calc Functions/ERROR.TYPE

Function name:
ERROR.TYPE

Category:
Spreadsheet

Summary:
Generates a code number representing the type of error found in the argument.

Syntax:
ERROR.TYPE(Expression)

Returns:
Returns a positive integer in the range [1, 7] if the argument represents one of seven defined error conditions. Returns the #N/A error if the argument does not represent an error, or represents an error outside the set of seven common errors that have been mapped to error types.

The mapping of Calc’s errors to the seven error types is given by the following table.

Arguments:
Expression is an expression, or a reference to a cell containing an expression, whose error type is to be determined.

Additional details:

 * The integer error type value may help you generate bespoke error messages that are helpful to the intended users of your spreadsheet.


 * If the ERROR.TYPE function is used as condition of an IF function call and the ERROR.TYPE call returns #N/A, the IF function returns #N/A as well. Use  ISERROR to avoid this, as shown in the final example below.

Related LibreOffice functions:
ERRORTYPE

IF

ISERROR

NA

ODF standard:
Section 6.13.11, part 2

Equivalent Excel functions:
ERROR.TYPE