The ERROR.TYPE function is used to return a number corresponding to the error value of a cell.



error_val The cell or formula that contains an error value you want to evaluate.


When dealing with data analysis or complex formulas in Excel, errors are bound to occur. In such cases, the ERROR.TYPE function comes to your rescue by providing a numeric representation of the error type present in a specific cell or formula. This function is particularly handy for identifying and categorizing errors, enabling users to troubleshoot and rectify them efficiently.

ERROR.TYPE is a straightforward yet valuable tool in your Excel arsenal, aiding in error detection and resolution to maintain the integrity and accuracy of your spreadsheet calculations and analyses.


Suppose cell A1 contains a formula that results in a #DIV/0! error. To determine the type of error in cell A1, you can use the formula: =ERROR.TYPE(A1). This will return the error code 2, indicating a #DIV/0! error.

If cell B2 contains a #VALUE! error due to an incorrect data type conversion in a formula, you can use: =ERROR.TYPE(B2) to retrieve the error code 3 signifying a #VALUE! error.


How can ERROR.TYPE function assist in error detection?

The ERROR.TYPE function helps in error detection by providing a numeric code that represents the type of error present in a specified cell or formula. This information aids users in pinpointing the nature of the error and taking appropriate corrective actions.

Can ERROR.TYPE be used to identify all possible error types in Excel?

ERROR.TYPE can identify most common error types such as #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, and #NULL!. However, there are additional specific error types in Excel that may not be covered by ERROR.TYPE.

How can the result of ERROR.TYPE function be interpreted and used?

The numeric output returned by ERROR.TYPE corresponds to a specific error type code in Excel. Users can use this code to categorize errors, troubleshoot formulas, and implement targeted solutions to rectify the identified issues.

Related functions