Ignore #DIV/0!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can I use an IF function to ignore the #DIV/0 output when making a formula
and if so how and if not what could I use?
 
One way:

Assuming your existing formula is


=A1/B1

then use

=IF(B1=0,"",A1/B1)
 
One way:

Instead of in say, C1: =A1/B1
use in C1: =IF(ISERROR(A1/B1),"",A1/B1)
 
DLZ217 said:
Can I use an IF function to ignore the #DIV/0 output when making a formula
and if so how and if not what could I use?

You could trap #DIV/0! using

=IF(COUNT(1/(ERROR.TYPE(expression)=2)),"ignore",expression)

but it's generally better to trap the subexpression causing the error, e.g.,
to trap it in averages,

=IF(COUNT(x),AVERAGE(x),"ignore")

and to trap it in denominators,

=IF(N(denominator)<>0,numerator/denominator,"ignore")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top