Check Sheet Logo
Check Sheet

ERROR.TYPE

The ERROR.TYPE formula returns a number indicating the type of error value in the given reference. This formula is commonly used to identify error types and act accordingly, for example, to replace specific error types with a custom message or value.

Usage

Use the ERROR.TYPE formula with the syntax shown below, it has 1 required parameter:

=ERROR.TYPE(reference)
Parameters:
  1. reference (required):
    The cell or range of cells that contain the error value to be evaluated.

Examples

Here are a few example use cases that explain how to use the ERROR.TYPE formula in Google Sheets.

Identifying error types

You can use ERROR.TYPE to quickly identify the type of error value in a cell or range of cells, such as #N/A, #VALUE!, #REF!, #DIV/0!, #NUM!, #NAME?, or #NULL!. This can be useful for troubleshooting and fixing formula errors.

Replacing error types

You can use ERROR.TYPE in combination with other formulas like IF or SWITCH to replace specific error types with a custom message or value. For example, you can replace all #N/A errors with "Not found" or all #DIV/0! errors with 0.

Creating dynamic message alerts

You can use ERROR.TYPE to create dynamic message alerts for specific error types. For example, you can create a message that says "Please enter a valid number" when a #VALUE! error occurs or "Please enter a valid date" when a #NUM! error occurs.

Common Mistakes

ERROR.TYPE not working? Here are some common mistakes people make when using the ERROR.TYPE Google Sheets Formula:

Incorrect argument type

One common mistake is passing an argument that is not a valid error reference. The function expects an error reference like #N/A or #VALUE!. If you pass something else, like a number or a text string, you will get an error message.

Missing argument

Another mistake is omitting the argument. The function needs a reference to an error cell in order to determine the type of error. If you omit the reference, you will get an error message.

Incorrect syntax

A third mistake is using the wrong syntax. The function only takes one argument, which is a reference to an error cell. If you use the wrong syntax, you will get an error message.

The following functions are similar to ERROR.TYPE or are often used with it in a formula:

  • IFERROR

    The IFERROR formula is used to check whether a specified value results in an error or not. If the value results in an error, then it returns a user-specified value instead of the error. This function is commonly used to prevent errors from breaking a formula or to replace error messages with custom messages.

  • ISERROR

    The ISERROR formula is used to check if a value contains an error. This formula returns TRUE if the value is an error, and FALSE if it is not. This function is most commonly used in combination with other formulas that can return errors, to ensure that the resulting value is valid.

  • ISNA

    The ISNA function checks whether a value is #N/A. If the value is #N/A, the function returns TRUE; otherwise, it returns FALSE. This function is commonly used in combination with other functions that may return #N/A as a result.

  • IFNA

    The IFNA function checks if a value is an #N/A error and returns a specified value if it is. This is useful when you want to replace #N/A errors with a specific value. The function takes two arguments, the first argument is the value to check for #N/A error and the second argument is the value to return if the first argument is #N/A error.

Learn More

You can learn more about the ERROR.TYPE Google Sheets function on Google Support.