Full Version: #Div/0!
kakluvs2sk8
Hi,
I have created a calculation in a report. There are some records which are dividing by zero. Since division by zero is impossible, it is returning #Div/0! for those records. Is there a way I can make those records show with nothing in the report (Instead of #Div/0!). I thought I might be able to do conditional formatting, but I have not had luck with it.

Thanks,
Kelly
theDBguy
It would help to see your code, but should be something like this:

=IIf([Field1]=0, 0, [Field2]/IIf([Field1]=0,1,[Field1]))

(untested)
Hope that helps...
kakluvs2sk8
Here is my calculation:
=([Total Of Billed PM]/([SumOfTotal EFM]/[Duration]))/[Project Months]

Where project months can be zero (thus creating the #Div/0). Can I add an if statement to this calculation?
doctor9
Yes, just substitute the [Project Months] bit in the IF test, and your formula in the FALSE section of the test.

=Iif([Project Months]=0,0,([Total Of Billed PM]/([SumOfTotal EFM]/[Duration]))/[Project Months])

Basically, this says, "If the Project Months field is zero, then just display a zero. Otherwise, display the result of a calculation."

Hope this helps,

Dennis
kakluvs2sk8
Wow that worked like a charm! Thanks bunches!
theDBguy
You're welcome. Dennis and I are happy to help. Good luck with your project.