Sum with #Div/0!

S

Shhhh

Hello all...

I have a sheet where I am returning a number of cells with the value #Div/0!
which I need to in turn add up... I know the formula where instead of:
=A1/B1 you insert =if(B1=0,"",A1/B1)...
But my original formula is just a bit more complicated than that... here is
the formula I am working with...

=SUM(((E6-D6)*(100000*C6))/(G6))+F6

How can I manipulate this formula to take care of that pesky error?


Thank you all so much,
Shhhh
 
D

Dave Peterson

First, I don't think you need the =sum() in your formula:

=(((E6-D6)*(100000*C6))/G6)+F6
should work just as well.

And if you're lucky, it could be as simple as:

=if(g6=0,"",(((E6-D6)*(100000*C6))/G6)+F6)

That just checks the divisor (G6). But those other cells could have formulas
that contain #div/0! errors, too.

You could check the whole expression:
=if(iserror((((E6-D6)*(100000*C6))/G6)+F6),"",(((E6-D6)*(100000*C6))/G6)+F6)

Then if E6 or D6 or C6 or F6 or even G6 caused the error, it would be caught.
 
C

Curt

if I am right about this formuls it is all about placement of ( ) . Use as
many cell as needed?

Shhhh said:
Dave,

Thanks this formula worked great! Really appreciate it.

Shhhh
 
Top