The Excel Error.Type function receives an error value and returns an integer, that tells you the type of the supplied error.
The syntax of the function is:
Where the supplied error_val is a value (or a reference to a cell containing a value), that you want to return the error type of.
The integers returned by the Excel Error.Type function, and their corresponding error types are listed in the table below:
See the Excel Formula Error page for more information on each of these error types.
Column B of the following spreadsheet shows four examples of the Error.Type function.
Note that the last example, in cell B4, tests the contents of cell A4, which is not an error. Therefore, the Error.Type function returns the #N/A error.
For further details of the Excel Error.Type function, see the Microsoft Office website.