work around #Num! Error when dividing by 0?

JCross

Registered User.
Local time
Today, 18:11
Joined
Feb 28, 2002
Messages
116
I have a calculation on my report that sometimes ends up dividing by 0 - and when it does, it comes up with a #Num! error. I tried to Nz it, but it didn't work, any suggestions?

=([ExtensionA]+[CostB]+[CostC]-[ExtensionE])/[SumCount]

is my control source.

Thank you!

Jennifer
 
not sure if my parens are correct, but try something like:

=IIF([SumCount]>0,([ExtensionA]+[CostB]+[CostC]-[ExtensionE])/[SumCount]),0)


hth,
al
 
YAY! The parens wound up like this

=IIF([SumCount]>0,(([ExtensionA]+[CostB]+[CostC]-[ExtensionE])/[SumCount]),0)

and then it worked perfectly.

Thank you!

Jennifer
 

Users who are viewing this thread

Back
Top Bottom