MS Excel: Error.Type Function
In Excel, the Error.Type function returns the numeric representation of one of the errors in Excel.
The syntax for the Error.Type function is:
Error.Type( error_value )
error_value is an error value in Excel. error_value can be one of the following values:
error_value Returned #NULL! 1 #DIV/0! 2 #VALUE! 3 #REF! 4 #NAME? 5 #NUM! 6 All other values #N/A
Applies To:
- Excel 2007, Excel 2003, Excel XP, Excel 2000
For Example:
Let's take a look at an example:

Based on the Excel spreadsheet above:
=Error.Type(B2) would return 2 =Error.Type(B3) would return 4 =Error.Type(B4) would return #N/A