Excel ERROR.TYPE Function

Using the Excel ERROR.TYPE Function


The Excel ERROR.TYPE function a numerical value that corresponds to one of the various error values in Excel. If no error exists the function returns #N/A.

ERROR.TYPE is useful if you are using an IF statement and need to test for an error value and want to return a text string as opposed to the error value itself.


=ERROR.TYPE (error_val)

Syntax Breakdown

Error Val
Required. The error value whose corresponding numeric value you wish to find. The argument can be the actual error value or a reference to a cell containing the error value. The numeric codes are as follows:

#NULL! 1
#DIV/0! 2
#REF! 4
#NAME? 5
#NUM! 6
#N/A 7
All else #N/A

Usage Notes

ERROR.TYPE returns a numerical value for a corresponding error value. If no error exists, the function returns #N/A. The function is useful if you are required to test for a specific error value and display a message, rather than the actual error value, if and when certain error conditions exist.