23.08.2023 Views

CFI-Excel-eBook

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Corporate Finance Institute Excel

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”))

We get the result below:

Click here to download the sample Excel file

corporatefinanceinstitute.com

89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!