ERROR.TYPE function
Summary
Returns a number corresponding to an error type
Syntax
ERROR.TYPE(error_val)
The ERROR.TYPE function syntax has the following arguments:
• Error_val Required. The error value whose identifying number you want to find. Although error_val can be the actual error value, it will usually be a reference to a cell containing a formula that you want to test.
If error_val is | ERROR.TYPE returns
#NULL! | 1
#DIV/0! | 2
#VALUE! | 3
#REF! | 4
#NAME? | 5
#NUM! | 6
#N/A | 7
#GETTING_DATA | 8
Anything else | #N/A
• Error_val Required. The error value whose identifying number you want to find. Although error_val can be the actual error value, it will usually be a reference to a cell containing a formula that you want to test.
If error_val is | ERROR.TYPE returns
#NULL! | 1
#DIV/0! | 2
#VALUE! | 3
#REF! | 4
#NAME? | 5
#NUM! | 6
#N/A | 7
#GETTING_DATA | 8
Anything else | #N/A
Example
=ERROR.TYPE(A2)
=IF(ERROR.TYPE(A3)<3,CHOOSE(ERROR.TYPE(A3),"Ranges do not intersect","The divisor is zero"))
=IF(ERROR.TYPE(A3)<3,CHOOSE(ERROR.TYPE(A3),"Ranges do not intersect","The divisor is zero"))