Correcting the #Num! error in a form control

lcook1974

Registered User.
Local time
Today, 04:09
Joined
Dec 21, 2007
Messages
330
Good afternoon,
Here is an easy on for you...I think. I have been trying to lose the #num! error I recieve when something is divided by a 0. I just can't seem to get it right, I have an excel formula that works beautifully and I tried it in there but that didn't work either.

Below is what I have now and I still get the #NUM! error. Basically if it isn't divisible then I want to show a "0", there or leave it blank.

=IIf(([EyeDeferredpay]/[EyeDeferred])<1,"",([EyeDeferredpay]/[EyeDeferred]))

Can any one help?
Larry
 
how about testing to see if it is zero first. if it's zero, skip the division.

or something like (not tested):
=IIf([EyeDeferred]>0,([EyeDeferredpay]/[EyeDeferred]),0))
 
Hello:

You might try also, the IsError function to test for an error. Division by 0 does generate this error.

Regards
Mark
 
Mark, Thanks I tried that but it wasnt' working.
What WAZZ said works great!!
Thank you both! I knew is was something easy. I just didn't have the easy button with me. hehehe

Larry
 

Users who are viewing this thread

Back
Top Bottom