ERROR.TYPE()

Syntax. ERROR.TYPE(error_value)

Definition. This function returns a number corresponding to an error value in Excel. If no error exists in the cell or in the calculation, the function returns the #N/A error.

Arguments

  • error_value (required). The error value (either the actual error value in a cell or the result of a calculation) for which you want to find the error code

Background. You can use this function in an IF() function to replace the error value with a string explaining the error. To do this, you need to be familiar with the relationship between error values and return values (see Table 11-4).

Table 11-4. Error Values and Results of the ERROR.TYPE Function

Error Value

Return Value

#NULL!

1

#DIV/0!

2

#VALUE!

3

#REF!

4

#NAME?

5

#NUM! ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.