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!

Divide by Zero Error 1

Status
Not open for further replies.
Dec 11, 2009
60
US
I cannot figure out the correct syntax to avoid this error:

"Divide by Zero Error"

Here is the formula:

{Command.total}/{Command.returns}

Thanks!!
 
if {Command.returns} <> 0 then
{Command.total}/{Command.returns}

But I wonder if what you really want is the ratio of returns, which would be:

if {Command.total} <> 0 then
{Command.returns}/{Command.total}


-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top