=(80-COUNTIF(C8:AD9,"b"))*5%
--
HTH
Bob Phillips
(replace xxxx in email address with googlemail if mailing direct)
"John Smith" <(E-Mail Removed)> wrote in message
news

4KcnU1-(E-Mail Removed)...
> Our employees earn leave at a percentage of their hours worked. This is
> simple enough to set up. If they work 80 hours in a pay period and earn
> at the rate of 5%then the formula is simple. However, the spreadsheet
> tracks only leave (leave clerks are the only users). Currently, the
> leave is calculated assuming that the employee was in a "payed" status
> for their entire 80 hours. I'm trying to add the calculation for the
> accrual when an employee does not have 80 paid hours in the period. I
> can pick up the unpaid leave code with the sumif function but I need to
> subtract it from the 80 hours and multiply the total hours paid by the
> 5%. I know this seems nuts but the leave clerk does not always have the
> payroll to know when the employee does not have the full pay period.
> She must decipher all this from a leave request. Sounds goofy but it's
> how we do it.
> So far this has not worked
> =sum(80-(sumif(c8:ad9,"b",C8:ad9)),*.05)