ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   divide by 0 (https://www.excelbanter.com/excel-worksheet-functions/23296-divide-0-a.html)

sony654

divide by 0
 
if "a2/b2" = .17/0 = 100%, why can't I get in a formula, instead of #DIV/0!?
Thanks - Tom
--
Sony Luvy

Peo Sjoblom

Because you can't divide by zero, that is what the error says as well


--
Regards,

Peo Sjoblom


"sony654" wrote in message
...
if "a2/b2" = .17/0 = 100%, why can't I get in a formula, instead of
#DIV/0!?
Thanks - Tom
--
Sony Luvy




Chip Pearson

Sony,

0.17/0 does NOT equal 100%. You can't divide a number by zero.
Use a formula like

=IF(B2=0,100%,A2/B2)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"sony654" wrote in message
...
if "a2/b2" = .17/0 = 100%, why can't I get in a formula,
instead of #DIV/0!?
Thanks - Tom
--
Sony Luvy




sony654

Now, what if cell A2 is negative (-), ie. -6, the outcome is -100%. How do I
use the "and" or "or" function to display 100% or -100% depending on the
value in A2?
Thanks for your help on this... Tom

"Chip Pearson" wrote:

Sony,

0.17/0 does NOT equal 100%. You can't divide a number by zero.
Use a formula like

=IF(B2=0,100%,A2/B2)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"sony654" wrote in message
...
if "a2/b2" = .17/0 = 100%, why can't I get in a formula,
instead of #DIV/0!?
Thanks - Tom
--
Sony Luvy





Peo Sjoblom

Look at the ABS function

--
Regards,

Peo Sjoblom


"sony654" wrote in message
...
Now, what if cell A2 is negative (-), ie. -6, the outcome is -100%. How do
I
use the "and" or "or" function to display 100% or -100% depending on the
value in A2?
Thanks for your help on this... Tom

"Chip Pearson" wrote:

Sony,

0.17/0 does NOT equal 100%. You can't divide a number by zero.
Use a formula like

=IF(B2=0,100%,A2/B2)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"sony654" wrote in message
...
if "a2/b2" = .17/0 = 100%, why can't I get in a formula,
instead of #DIV/0!?
Thanks - Tom
--
Sony Luvy







All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com