Documentation/Calc Functions/ERRORTYPE

Function name:
ERRORTYPE

Category:
Spreadsheet

Summary:
Determines the error number for a specified cell that is displaying an error.

A full list of the possible Calc error numbers can be viewed in the Help system. For any type of error, the ERRORTYPE function returns an integer error number which may help you generate bespoke error messages that are more helpful to the intended users of your spreadsheet.

Syntax:
ERRORTYPE(Reference)

Returns:
Returns a positive integer in the range [501, 540] when an error condition is found in the referenced cell. If no error is found in that cell, then the #N/A error is returned instead.

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

Additional details:

 * Many of the common errors that arise in cells are highlighted by the display of a short string indicating the general nature of the error (for example, #DIV/0! or #NAME?). However, some other errors result in the display of a less helpful string such as Err:502 or Err:511. Whichever of these error indication styles is used, clicking the cell enables you to view a more detailed explanation of any error in the Status Bar at the bottom of the Calc window.


 * For those errors that cause display of an error code of the form Err:nnn (for example, Err:502), the mapping of that error code to an error number is obvious – for example, error code Err:511 is mapped to error number 511. The mapping for other types of error code is given by the following table.

Related LibreOffice functions:
ERROR.TYPE

ODF standard:
None

Equivalent Excel functions:
None