468,167 Members | 1,882 Online

# Dividing by zero

This is my original equation: =([Total Maintain Exercise]/[Total
Completing 1 mo Follow-up])*100

When the denomimator is zero I am unable to calculate the percentage.

I tried changing my equation to this format:
=IIf([denominator_field] = 0, 0, [numerator_field]/
[denominator_field])

I also tried:

IF(B=0,0,A/B) will give you an answer of 0 if the
denominator is zero or IF(B=0,"",A/B) will give you a blank in the
same
situation.

Any suggestions...I am desperate as I was hoping this would be an EASY
fix!

Thanks!,

John
Oct 17 '08 #1
1 1409 zufie wrote:
This is my original equation: =([Total Maintain Exercise]/[Total
Completing 1 mo Follow-up])*100

When the denomimator is zero I am unable to calculate the percentage.

I tried changing my equation to this format:
=IIf([denominator_field] = 0, 0, [numerator_field]/
[denominator_field])

I also tried:

IF(B=0,0,A/B) will give you an answer of 0 if the
denominator is zero or IF(B=0,"",A/B) will give you a blank in the
same
situation.

Any suggestions...I am desperate as I was hoping this would be an EASY
fix!

Thanks!,

John
Why not use/create a function in a code module?
Function DivideIt(a,b) As Variant
If b <0 then DivideIt = a/b
End Function
and insert as the control source
=DivideIt([FieldValue],[FieldValue]}
Oct 17 '08 #2

### This discussion thread is closed

Replies have been disabled for this discussion.

### Similar topics

 5 posts views Thread by M. Akkerman | last post: by 65 posts views Thread by Pmb | last post: by 4 posts views Thread by ferbar | last post: by 3 posts views Thread by gh | last post: by 11 posts views Thread by Martin Höfling | last post: by 4 posts views Thread by Harish Ramadurgam | last post: by 2 posts views Thread by meggahertz | last post: by 2 posts views Thread by kcdoell | last post: by 1 post views Thread by gupthabhargav | last post: by 1 post views Thread by sipeed | last post: by reply views Thread by LessComplexity | last post: by reply views Thread by ravipankaj | last post: by reply views Thread by ravipankaj | last post: by reply views Thread by kamranasdasdas | last post: by 14 posts views Thread by EricB | last post: by reply views Thread by gcreed | last post: by reply views Thread by Swethas3124 | last post: by 2 posts views Thread by tgifrank32 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.