View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Joe User[_2_] Joe User[_2_] is offline
external usenet poster
 
Posts: 905
Default HELP please... easy function

"JoZo" wrote:
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 -----

"JoZo" wrote in message
...
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