Google Sheets ERROR.TYPE Function: Syntax, Examples & Tips

The ERROR.TYPE function returns a number corresponding to the type of error in a cell, helping identify specific error types in Google Sheets.
Google Sheets
ERROR.TYPE(reference)

One free generation or explanation per browser, shared across Excel and Google Sheets. Account usage limits apply afterward.

On this page
  1. Parameters
  2. What is ERROR.TYPE?
  3. A Practical Example
  4. ERROR.TYPE Formula
  5. Result of the Formula
  6. Why Use ERROR.TYPE?
  7. Key Takeaways:
  8. Example use case

Parameters

reference:
The cell or range of cells that you want to evaluate for an error type.

What is ERROR.TYPE?

The ERROR.TYPE function in Google Sheets is a useful tool that helps you identify the type of error that has occurred in a formula. This function returns a number corresponding to the specific error type, allowing you to handle errors more effectively in your spreadsheets. It is particularly helpful for debugging and creating more robust formulas that can gracefully handle potential issues.

In simpler terms, ERROR.TYPE allows you to pinpoint what kind of error is present in a cell, making it easier to troubleshoot and resolve issues.

A Practical Example

Imagine you are working on a financial report in Google Sheets, and you have a formula that is returning an error. You want to determine what type of error it is so you can fix it.

Sample Data:

ItemCostQuantity
A102
B150
C#DIV/0!5

In this example, the Cost for Item C is causing a division by zero error.

ERROR.TYPE Formula

To identify the error type in the Cost column, you would use the ERROR.TYPE function as follows:

Google Sheets
=ERROR.TYPE(B2)

In this formula:

  • B2 is the cell containing the formula or value you want to check for errors.

Result of the Formula

When you apply the ERROR.TYPE formula to the Cost column, the output would look like this:

ItemCostQuantityError Type
A102
B150
C#DIV/0!52

In this case, the ERROR.TYPE function returns 2 for Item C, indicating a division by zero error.

Why Use ERROR.TYPE?

ERROR.TYPE is beneficial because it allows you to diagnose issues in your formulas quickly. By identifying the specific type of error, you can take appropriate action to correct it. This function is particularly useful in complex spreadsheets where multiple formulas may be interacting, and understanding the source of an error is crucial for maintaining data integrity.

Key Takeaways:

  • ERROR.TYPE: A function that identifies the type of error in a formula and returns a corresponding number.
  • Error Codes: Each error type has a specific code, making it easier to understand the issue.
  • Debugging: Helps in troubleshooting formulas and improving the reliability of your spreadsheets.
  • Common Use Cases: Ideal for financial reports, data analysis, and any scenario where error handling is necessary.

ERROR.TYPE is an essential function for anyone working with data in Google Sheets, providing a powerful way to enhance error management and improve the overall quality of your spreadsheets.

Happy spreadsheeting!

Example use case

You have a dataset of sales transactions in Column A. Using the ERROR.TYPE formula, you can identify and categorize any errors in your calculations, such as #DIV/0! or #N/A, ensuring data integrity and facilitating troubleshooting in your financial reports.

Need more help with Google Sheets formulas?

Sign up for Better Analyst and get unlimited AI-powered formula generation, explanations, and advanced data analysis.

Explore all Google Sheets formulas

Browse our complete library of Google Sheets formula guides

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.