Over 2 million + professionals use CFI to learn accounting, financial analysis, modeling and more. Unlock the essentials of corporate finance with our free resources and get an exclusive sneak peek at the first module of each course.
Start Free
What is the ERROR.TYPE Function?
The ERROR.TYPE Function[1] is categorized as an Excel Information function. The function returns a number that corresponds to a specific error value. If there is no error, it will return #N/A.
While doing financial analysis, we can use this to test for a specific error value. Also, we can use ERROR.TYPE to display a customized error message. This can be done using the IF function. The IF function can be used to test for an error value and return a text string, such as a message, instead of the error value.
Formula
=ERROR.TYPE(error_val)
Where:
Error_value (required argument) – This is the error value for whom we wish to find the identifying number. Though error_val can be the actual error value, it will usually be a reference to a cell containing a formula that we want to test.
The numbers provided by Excel:
If error_val is
ERROR.TYPE returns
#NULL!
1
#DIV/0!
2
#VALUE!
3
#REF!
4
#NAME?
5
#NUM!
6
#N/A
7
#N/A
8
Anything else
#N/A
How to use the ERROR.TYPE Function in Excel?
Let’s see a few examples to understand how the ERROR.TYPE function works.
Example
Suppose we wish to display customized messages for certain errors:
Now we wish to input a customized message. What we want is that this formula should check the given cell reference, i.e., cell A2, to see whether the cell contains either the #NULL! error value or the #DIV/0! error value.
If errors are found, the number for the error value is used in the CHOOSE worksheet function to display one of two messages; otherwise, the #N/A error value is returned.
The formula to use is:
=IF(ERROR.TYPE(A2)<3,CHOOSE(ERROR.TYPE(A4),”Ranges do not intersect”,”The divisor is zero”))
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional CFI resources:
To master the art of Excel, check out CFI’s Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Excel Crash Course now to take your career to the next level and move up the ladder!
Take your learning and productivity to the next level with our Premium Templates.
Upgrading to a paid membership gives you access to our extensive collection of plug-and-play Templates designed to power your performance—as well as CFI's full course catalog and accredited Certification Programs.
Gain unlimited access to more than 250 productivity Templates, CFI's full course catalog and accredited Certification Programs, hundreds of resources, expert reviews and support, the chance to work with real-world finance and research tools, and more.