Getting error #DIV/0

Hi all

If we divide a number with zero then we get #DIV/0.
I followed the formula using the IsError, then and Else statement and I was able to get rid of the error.
But it looks like the result is not a number anymore.
I use the ToNumber function after that but if I do that, I’m getting the error again.
How do you divide a number that the result will be zero or null value.

THanks in advance
B…


bobjkb :india: (BOB member since 2004-03-19)

To avoid the DIV/0 error,use a if condition before the division…
=if <> 0 then /
then you can format those cells where you have the denominator=0…
Hope this helps…
Sarma.


pvsbandi (BOB member since 2005-05-13)

Not only that use IF ISNULL() then 0 else formula.


Lachase (BOB member since 2005-09-06)

You should be using something like:


=IF ISERROR(<Num>/<Denom>) THEN 0 else <Num>/<Denom>

Alternatively:


=IF <Denom>=0 THEN 0 else <Num>/<Denom>

digpen :us: (BOB member since 2002-08-15)

Omit the ELSE clause to return null values in the case of errors. Here’s a previous post

https://bobj-board.org/t/16512


Jason Katakura :us: (BOB member since 2002-08-16)

Hi ,
Even I m facing the same issue;

But i dont want to format the report. Instead it should do by itself on providing run time parameters. I want #div/0 with either ‘0’ or NULL or hiding row.


pavani4 (BOB member since 2010-06-15)

Perfect, first solution by digpen worked for me. great stuff :smiley:


Karachiite (BOB member since 2013-04-12)

=IF =0 THEN 0 else /

DigPin this worked great thanks!


StinksatWebi (BOB member since 2015-06-25)