View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sande Leonardo[_2_] Sande Leonardo[_2_] is offline
external usenet poster
 
Posts: 6
Default if formula with two sections

Sorry that did not work.

What I have is =sum(A1/B1) and the answer I get is a number or if the
number is zero I get in cell A# is #DIV/0!

I am trying to not get the #DIV/0! I want a plain 0 in A3

So I need the A1/B1 with something to make it say 0 is the answer is 0.

thanks for all you help

"bj" wrote:

=if(and(isnumber(A1),isnumber(A2),if(A1<0,A2/A1,0),0)
this checks if both are numbers and that the demonimator is not zero befor
dividing and if not will give a zero.
"Sande Leonardo" wrote:

I have a number in cell A1, and in A2.
I need to divide A2 by A1 into A3 (that I can do)

I need A3 to be the answer in the form of a number or have it show a "0"

something like - If A3<1, "0", otherwise put the answer there.

"bj" wrote:

I am not sure what you want but maybe something like
numerator in Cell A1
Denominator in Cell B1
=if(or(B1=0,b1=""),0,A1/B1)

the simple response to your question might also be
=A1/B1

"Sande Leonardo" wrote:

how do I tell a formula to divide two cells, leave a "0" if that, and leave
the number is there is a number?