Correcting the #Num! error in a form control (1 Viewer)

lcook1974

Registered User.
Local time
Yesterday, 21:45
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
 

wazz

Super Moderator
Local time
Today, 09:45
Joined
Jun 29, 2004
Messages
1,711
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))
 

mhartman

Dr. Data
Local time
Yesterday, 18:45
Joined
Jun 5, 2006
Messages
442
Hello:

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

Regards
Mark
 

lcook1974

Registered User.
Local time
Yesterday, 21:45
Joined
Dec 21, 2007
Messages
330
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

Top Bottom