Zero values in formula

G

Guest

My formula is A1/A2 however if they are both Zero values it is producing the
#DIV/O! If there are Zeros in A1 and A2 how do I get the product to also be
Zero in A3?
 
B

Bob Phillips

=IF(A2=0,A2,A1/A2)

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
R

RagDyer

One way:

=IF(A2,A1/A2,0)

--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================
 
G

Guest

CHRIS THANK YOU FOR YOUR RESPONCE HOWEVER, I AM LOOKING FOR THE FOLLOWING.
SORRY FOR THE CONFUSION.

A1=1 AND A2=1 AND WHEN I DIVIDE A1 BY A2 THEN IN A3 I GET 1. HOWEVER, WHEN
BOTH A1 AND A2 EQUAL ZERO THEN I WOULD LIKE A3 TO EQUAL ZERO. SO THERE STILL
NEEDS TO BE A DIVISION CALCULATION BUT WHEN THEY ARE BOTH ZERO IT WOULD THEN
BE ZERO IN A3. I HOPE THIS IS MORE CLEAR SOMETIMES I HAVE A HARD TIME GETTING
MY POINT ACROSS IN AN E-MAIL. THANKS AGAIN FOR YOUR ASSISTANCE.
 
B

Bob Phillips

Are you saying that you want #DIV/0 if A1 holds 0 and A2 doesn't, because
that is what Chip's alternative will give you. It seems that Chip's original
is more robust.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

YOU FOR YOUR RESPONCE HOWEVER, I AM LOOKING FOR THE FOLLOWING.
SORRY FOR THE CONFUSION.

A1=1 AND A2=1 AND WHEN I DIVIDE A1 BY A2 THEN IN A3 I GET 1. HOWEVER, WHEN
BOTH A1 AND A2 EQUAL ZERO THEN I WOULD LIKE A3 TO EQUAL ZERO. SO THERE STILL
NEEDS TO BE A DIVISION CALCULATION BUT WHEN THEY ARE BOTH ZERO IT WOULD THEN
BE ZERO IN A3. I HOPE THIS IS MORE CLEAR SOMETIMES I HAVE A HARD TIME GETTING
MY POINT ACROSS IN AN E-MAIL. THANKS AGAIN FOR YOUR ASSISTANCE.
 
B

Bob Phillips

PLEASE DON'T SHOUT. I READ SENTENCE CASE MUCH BETTER THAN UPPER CASE.

Both of Chip's formulae do what you state. The second will give #DIV/0 if A1
is 0.

Tell us what is wrong with what Chip gave you, with what I gave you, what RD
gave you.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

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