Dividing - Negative Number by Zero

J

Jim

Looking for a solution of dividing a negative number by zero to show a result
of a negative percentage.
For Example;
T32=-1.47
S32=0.00
Current formula = =IFERROR(T32/S32,0) resulting in a 100% value

However I would like the result to show a negative %.

Thank You
 
F

Fred Smith

You're getting the result of 100% because the answer to your Iferror
statement is True (ie, dividing by zero is an error), which as a number is
1, which formatted as a percent is 100%.

You don't say what result you want when dividing by zero (negative percent
of what?), so just fill it in in the following formula:
=if(s32=0,"the answer you want",t32/s32)

Regards,
Fred.
 
J

Jim

Thanks Fred, looking for a negative % of 100%
Not sure I understand "the answer you want"? I want the product to represent
a -percentage since there is no funds available to spend against.
 
J

JoeU2004

Jim said:
Looking for a solution of dividing a negative number by zero to show
a result of a negative percentage.

You cannot divide anything by zero, negative or positive.

For Example;
T32=-1.47
S32=0.00
Current formula = =IFERROR(T32/S32,0) resulting in a 100% value

Hmm, that should result in 0%, not 100%.

However I would like the result to show a negative %.

Zero cannot be signed, unless you display it as text (e.g. "-0%").

But if you want plus/minus 100%, which is typical when reporting gains and
losses, you can do the following:

=IFERROR(T32/S32, SIGN(T32))

formatted as Percentage. Note that SIGN() returns -1, 0 and 1 for negative,
zero and positive values. So when S32 is zero, this will return -100%, 0%
and 100% depending on T32.

Is that what you want?

If not, then provide examples of what you for the three values of T32.
 
J

Jim

Thanks. What I'm going to use so I can quickly identify -% is the following;
=IF(ISERROR(T3/S3),"n/a",(T3/S3)) which I believe Fred was trying to tell me
last evening.
 
J

JoeU2004

Jim said:
Thanks. What I'm going to use so I can quickly identify -% is the
following;
=IF(ISERROR(T3/S3),"n/a",(T3/S3)) which I believe Fred was trying to tell
me last evening.

Actually, Fred suggested:

=IF(S3=0, "n/a", T3/S3)

But if you have IFERROR (Excel 2007), you could simply modify your original
formula as follows:

=IFERROR(T3/S3, "n/a")


----- original message -----
 

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