In Excel, the ERROR.TYPE function returns the type of error that was encountered. The function can be used in a VLOOKUP function to determine which value was not found, or in a formula to determine if an error has occurred. The function takes one argument, the error value, and returns a number indicating the type of error. The numbers returned by the function are:
#VALUE! - A value was entered that is not a number #REF! - A reference was used in a formula that is not valid #DIV/0! - The divisor in a division operation is zero #N/A - The value was not found in the lookup table
-4 - #N/A was returned by an INDEX or MATCH function
-5 - #VALUE! was returned by an INDEX or MATCH function
ERROR.TYPE is a built-in function in Excel that returns the error type of the given error value. The syntax of ERROR.TYPE is as follows:
ERROR.TYPE(error value)
Where error value is the error value for which you want to know the error type.
The ERROR.TYPE function in Excel returns the error type of a given error value. This function can be used in conjunction with the IFERROR function to check for specific error types and take different actions based on the error type. For example, the following formula checks for the #N/A error type and returns the text "Not available" if the error value is #N/A:
=IFERROR(ERROR.TYPE(A1),"Not available")
The following table lists the different error types that the ERROR.TYPE function can return and provides an example of how the function can be used to return the error type for a specific error value.
ERROR.TYPE should not be used in Excel when the error is not a #VALUE! error. For example, if the user inputs a text string into a cell that is supposed to be a number, Excel will return the #VALUE! error. However, if the user inputs a number into a text string cell, Excel will return the #VALUE! error. In this case, ERROR.TYPE should not be used because it will return the #VALUE! error for both scenarios.
In Excel, the ERROR.TYPE function is used to return the error type of a given error value. The following are some similar formulae to ERROR.TYPE in Excel:
ISERROR()
ISERR()
IFERROR()