Excel Formula to show Zero

Solved/Closed
Gouws Posts 45 Registration date Sunday February 7, 2010 Status Member Last seen April 15, 2012 - Feb 15, 2010 at 07:28 AM
 Gouws - Feb 15, 2010 at 11:28 PM
Hello,
I'm using the formula =A2/(A2+A3) in A4, same in B to AF, i need the A4 line to show a zeros when A2-AF2 and A3-AF3 do not have values in.

TX
G

1 reply

rizvisa1 Posts 4479 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 767
Feb 15, 2010 at 07:44 AM
What you mean by "A2-AF2 and A3-AF3" not having value. Is this a range or equation?

Presuming its an equation then you can have

=IF(OR(A2-AF2=0, A3-AF3=0),0, A2/(A2+A3))

If it was a range and what you meant want you dont want division to occur if a2 and a3 are 0, in that case
=if(AND(A2=0, a3=0),0, A2/(A2+A3))
but perhaps you would be better off if you use this
=if(A2+ a3=0,0, A2/(A2+A3))


Hope it helps
1
Thanks rizvisa1
Yes the formula helped (A-AF is a range)
0