HELP please... easy function

J

JoZo

Hi,
I have a problem.
Here is the main formula:
=(A5*B5)/C5
but if there is nothing( blank) in cells A5 and C5 i got #DIV/0!
I don't want to have this error #DIV/0!, i just want that IF cells A5
and C5 are blank result 0 (ZERO).

I tried with that formula but is not working:

=IF(A5="blank";0;(A5*B5)/C5)

Can anyone help me please?

Thanks a lot
 
J

Joe User

JoZo said:
I don't want to have this error #DIV/0!,
i just want that IF cells A5 and C5 are
blank result 0 (ZERO).

The following might be sufficient:

=IF(C5=0, 0, A5*B5/C5)

No need to test if A5 or B5 is zero. The original formula takes care that,
since 0*y is zero, and 0/x is zero as long as x is non-zero.

However, you might need:

=IF(N(C5)=0, 0, A5*B5/C5)

or even better:

=IF(OR(C5=0,COUNT(A5:C5)<3), 0, A5*B5/C5)

Sometimes, a cell __appears__ empty, but it actually contains text which is
the null string, the result of the following very common paradigm:
=IF(something,"",something). In that case, the original formula might
result in a #VALUE! error.


----- original message -----
 
M

Mike H

Try this

=IF(A5=0,"",(A5*B5)/C5)

You seem to be using ; in your version of Excel where I use , so make the
necessary changes to suit your region.

Mike
 

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

Top