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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Division by zero 1

Status
Not open for further replies.

MICKI0220

IS-IT--Management
Jul 20, 2004
337
0
0
US
I've looked at a post which said to put an iff function in the calculation this is my original control

=((Sum([standards])-Sum([hours]))/Sum([standards]))

I then added the iff statement before it to make it look like this:
=iif(sum([standards]) = 0,0((Sum([standards])-Sum([hours]))/Sum([standards]))

I save it but then when I click on view it brings the statement back to the original statement and deletes what I just typed in there. Can someone help understand if maybe I have a syntax error or something going on here..

Thank you

Micki
 
It is syntax... you left out a comma after the 0. IIF has three parameters. You also had an extra left parenthesis where I added the comma.

Code:
=iif(sum([standards]) = 0,0[red],[/red] (Sum([standards])-Sum([hours]))/Sum([standards]))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top