I wrote a time card program in Excel 2000 (originally in XL97) that has been working now for two years. I have just discovered that there is a flaw in the sick day accumulation portion. Here's the way it's supposed to work. Our civilian employees can accumulate up to 45 sick days at a rate of 9 days per year and they receive those sick days on their anniversary date. I've got that covered pretty well, but the problem occurs when the employee has reached the 45 sick day limit and uses some sick days before their anniversary date and some after.
For example, the employee has 45 sick days accumulated at the beginning of the year and two sick days were taken in March (which is before the anniversary date of 10/24/02) and then another two sick days were taken in December. Since this employee received another 9 sick days on his anniversary date (but can only accumulate up to 45 days), the actual total accumulated should be 43 days (maximum of 45 on his anniversary date, then 2 taken off after the anniversary date), but the spreadsheet see all of the sick days for the entire year and deducts a total of 4 sick days thus reports a net of 41 days.
I need a formula that says if the employee has 45 accumulated sick days and has not used more than 9 days before his anniversary date, delete the sick days used prior to the anniversary date and start over from the anniversary date until the end of the year. The program works fine if the employee has less than the maximum of 45 days. Somehow, I need the spreadsheet to recognize the anniversary date and compare it to today’s date, then change the total based on the calendar date and sick days taken off.
For example, the employee has 45 sick days accumulated at the beginning of the year and two sick days were taken in March (which is before the anniversary date of 10/24/02) and then another two sick days were taken in December. Since this employee received another 9 sick days on his anniversary date (but can only accumulate up to 45 days), the actual total accumulated should be 43 days (maximum of 45 on his anniversary date, then 2 taken off after the anniversary date), but the spreadsheet see all of the sick days for the entire year and deducts a total of 4 sick days thus reports a net of 41 days.
I need a formula that says if the employee has 45 accumulated sick days and has not used more than 9 days before his anniversary date, delete the sick days used prior to the anniversary date and start over from the anniversary date until the end of the year. The program works fine if the employee has less than the maximum of 45 days. Somehow, I need the spreadsheet to recognize the anniversary date and compare it to today’s date, then change the total based on the calendar date and sick days taken off.