IIF statement and percentage

  • Thread starter Thread starter almost weekend
  • Start date Start date
A

almost weekend

Please help!

I am trying to generate a percentage from a Score,"Total
Score" that can be any number from "0" to "90", out of a
total possible points, "Out of" which can be
either "0", "30", "60",or "90".

My problem lies in the rare occasion of "0"/"0"...
So far I have tried the below formula, but I can not make
numbers after the decimal place.
IIf([Out of]>0,([Total Score]/[Out of])*100,"N/A")
the resulting number appear as a percentage with only two
Any ideas on how to make this formula display it result as
a percentage with no more than two decimal places?

Thanks in advance for anyany advice.
 
I would use:
IIf([Out of]=0,0,([Total Score]/[Out of]))
Then use the format property of the text box on your form or report to a
value that displays the format you desire.
 
Back
Top