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!

Divisor = 0

Status
Not open for further replies.

harrySCOTT

Technical User
Feb 10, 2003
6
US
I have a formula that is used to determine where an employee falls in their pay range. The formula is as follows the (Employee Hourly Rate-Range Minimum)/(Range Maximum-Range Minimum). If the employee rate=range minimum (meaning the divisor=0) then I use the following statement: if Employee Hourly Rate=Range Minimum then 0 else (Employee Hourly Rate-Range Minimum)/(Range Maximum-Range Minimum). When I run the report, I still get the error message "Division by 0." How can I get around this?

Thanks!
 
harrySCOTT,
employee rate=range minimum, using the formula you supplied, won't result in a 0 divisor unless the employee rate is equal to both the minimum and maximum range because range max and range min have to be equal to have a zero divisor

Try this:

if employee rate=range minimum then 0 else
if (Range Maximum-Range Minimum)<> 0 then
(Employee Hourly Rate-Range Minimum)/(Range Maximum-Range Minimum)
Mike
If you're not part of the solution, you're part of the precipitate.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top