I have a file showing how many paid sick days an employee has remaining, we get five days each on a rolling 365 day basis. So if someone is sick 24/05/16, 25/05/16, 26/05/16, 27/05/16, 28/05/16, they'll get paid for those 5 days. They will not be paid if they are sick on any day between 28/05/16 and 23/05/17. And if they are not sick from 24-28/05/16, they are re-entitled to their 5 days again.
We have a calendar of 365 days and we fill it in when someone is sick, then check how many days they have been sick in the past 365 days and fill in the table each time manually.
Basically, is there a way of automating the counting how many sick days paid someone gets within a 365 day timeframe?