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!

Dividing by 0 and #Error 1

Status
Not open for further replies.

dbero

Technical User
Mar 31, 2005
109
US
Hello:

I have a query that contains an x divided by y formula. Often times, the numerator is 0, thus the result is #Error. 0/8 = #Error, which displays on the report.

[CountOfErrors]/SumOfCountInBatch AS ErrorRatio,

Is there a way to intercede and display on the report a more meaningful value, like "Perfect"?


thank you,
 
Hi!

IIf(YourNumber = 0, "Perfect", Format(OtherNumber/YourNumber, "0.00")) As YourField

Of course you can use other formats such as "Percent" if that is appropriate.

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top