Information - ERROR.TYPE Function



Description

The ERROR.TYPE function returns a number corresponding to one of the error values in Microsoft Excel or returns the #N/A error if no error exists. You can use ERROR.TYPE in an IF function to test for an error value and return a text string, such as a message, instead of the error value.

Syntax

ERROR.TYPE (error_val) 

Arguments

Argument Description Required/ Optional
Error_val

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.

The Error Values Table given below shows you what numbers this Function returns for the different error values.

Required

Error Values

Error_val What 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

Notes

The following table shows what each of these different error messages mean −

S .No. Error Value & Meaning of the Error Value
1 #NULL!

Arises when you refer to an intersection of two ranges that do not intersect.

2 #DIV/0!

Occurs when a formula attempts to divide by zero.

3 #VALUE!

Occurs if of the variables in your formula is of the wrong type (e.g. text value when a numeric value is expected).

4 #REF!

Arises when a formula contains an invalid cell reference.

5 #NAME!

Occurs if Excel does not recognize a formula name or does not recognize text within a formula.

6 #NUM!

Occurs when Excel encounters an invalid number.

7 #N/A

Indicates that a value is not available to a formula.

Applicability

Excel 2007, Excel 2010, Excel 2013, Excel 2016

Example

Errortype Function
advanced_excel_information_functions.htm
Advertisements