I'm calculating sick days on an Attendance Report.
- Sick days accumulate at a rate of 1.25 per month.
- Employees will carry-forward unused sick days from 2008.
- The maximum sick days is 30.
In trying to create a formula that will multiple the current month (eg Dec=12) by 1.25, subtract any sick days taken YTD (S16), and add the carry-forward days from 2008 (W16), I noticed one problem with the following formula:
=IF(SUM(W16+(MONTH(TODAY())*1.25)-S16)>30,30,SUM(W16+(MONTH(TODAY())*1.25)-S16))
- the problem is if the supervisor reviews the information in Jan'10, the whole calculation changes.
I've used an IF stmt to limit the calculations to the year 2009, and then default to 15 (1.25 * 12). Does anyone see any reason why this wouldn't work??
=IF(SUM(W16+(IF(YEAR(TODAY())=2009,MONTH(TODAY())*1.25-S16,15)))>30,30,SUM(W16+(IF(YEAR(TODAY())=2009,MONTH(TODAY())*1.25)-S16),15))
Any help is much appreciated. Thanks!
Bookmarks