Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shorter version of IF(ISERROR(...))

I'm wondering if there is a way to check if a formula returns an error, and if not, use the value found, without doing the following:

=IF(ISERROR(A1/B1), 0, A1/B1)

The syntax I'm looking for is something like this:

=EQ([value_if_not_error], [value_if_error])

The solution might contain more stuff, IF and ISERROR is perfectly fine, as long as I avoid having the main function several times in each cell. The reason why I want to do this is that my equations are quite long and the readability is drastically reduced when I have to write the equation twice, or even more (if several ifs).

Is there a simple solution to this?

like image 428
Stewie Griffin Avatar asked Dec 05 '13 08:12

Stewie Griffin


Video Answer


1 Answers

Try

=IFERROR([formula], [value_if_error])
like image 190
Cool Blue Avatar answered Sep 16 '22 20:09

Cool Blue