Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to avoid division by 0 error

Status
Not open for further replies.

abc567

Programmer
Jul 8, 2009
45
US
Hi,
How to avoid division by 0 error.

I want to display percentage of survey time, so what i did is surveytime/totaltime*100..
But some values in total time is 0 .. so i am getting division by zero error..

Thanks..
 
Your formula should look like this:

if totaltime <> 0 then
surveytime % totaltime

-LB
 
Thanks buddy...
you are a life saver
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top