# Calculating number of sick days in a rolling year

1. ## Calculating number of sick days in a rolling year

Hi I would welcome any guidance you could give me about calculating the number of days in a rolling year.

The items below are my column headings

First Day of Absence/Last Day of Absence/number of days off/number of sick days within a 12 month period/number of sick periods in 12 month period

Example data

Column A First day = 13/08/2013
Column B Last Day = 20/08/2013
Column C Number of days off - I have used =NETWORKDAYS(a2,c2)

Column D No of sick days within 12 months - This is where I need help I need a formula that will look at the Date in column B and then calculate how many days have been taken in the previous 12 months

Column E No Sick periods - Again how do I calculate the amount of times opposed to days that someone has been off.

Any help would be greatly appreciated

Thank you

2. ## Re: Calculating number of sick days in a rolling year

Hi, have a look at the simple example attached.

SICK DAYS.xlsx

3. ## Re: Calculating number of sick days in a rolling year

Thank you for your help, but as soon as I enter a date which would be excluded within the 12 month period it still adds the days on rather than excluding days outside of the 12 month range. Not sure what to do next

4. ## Re: Calculating number of sick days in a rolling year

OK I've been working on another that excludes days older than 360 days - not perfect but getting closer

SICK DAYS.xlsx

5. ## Re: Calculating number of sick days in a rolling year

Try this: Sick Days.xlsx

6. ## Re: Calculating number of sick days in a rolling year

@OllyXLS - very cool, however the formula in col D "Number of sick days in the past 12 months" doesn't work ... sorry. In A2 in put 3/07/2012 and in B2 6/07/2012 and it still counted these days within the "last 12 months", so let's keep working on this but I do like your spreadsheet.

7. ## Re: Calculating number of sick days in a rolling year

Originally Posted by Ursul
@OllyXLS - very cool, however the formula in col D "Number of sick days in the past 12 months" doesn't work ... sorry. In A2 in put 3/07/2012 and in B2 6/07/2012 and it still counted these days within the "last 12 months", so let's keep working on this but I do like your spreadsheet.
I should have explained my interpretation of the requirement: for each row, my worksheet calculates the number of sick days / sick periods in the 12 months preceding the end date of this row's sick period. It also relies on keeping the sick periods sorted in ascending date order.

If you simply want to calculate these for the 12 months preceding today, then simple sumif / countif functions will work, assuming columns A:C remain as defined:

Number of sick days; =SUMIF(\$B:\$B,">="&TODAY()-365,\$C:\$C)
Number of sick periods: =COUNTIF(\$B:\$B,">="&TODAY()-365)

8. ## Re: Calculating number of sick days in a rolling year

SICK DAYS01.xlsx

9. ## Re: Calculating number of sick days in a rolling year

Wow - thank you so much, this forum is great!

Looking at how the formula works, I have now decided to only have the rolling information in one place above the table and it will make the collating of data from each sheet far easier.

I have then used =COUNTIF(B13:B99,">"&C7-365) to calculate the number of sick episodes in one year.

Sheet is very scruffy but have attached so you can see

10. ## Re: Calculating number of sick days in a rolling year

Well done Nikkie - if you are happy please mark the Thread as Solved - go to your first post top-right click on Thread Tools and mark Solved. If I have helped please click on "Add Reputation" (bottom-left) of my post.

Cheers

11. ## Re: Calculating number of sick days in a rolling year

Can you help me figure out hw to modify your file "Book1.xlsx" to calculate sick days in rolling 6 month time frame?

12. ## Re: Calculating number of sick days in a rolling year

CassConnors,
Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

1. Ensure your question is not too vague. Don't assume anyone is familiar with your problem. While you can upload small attachments, describe your problem in the body of the post. We are fortunate to have several Excel gurus, but few mind-readers.
2. On the other hand, skip irrelevant details. Be descriptive and concise. Short, direct, and to-the-point questions with apt thread titles are almost always answered promptly.
3. Keep the scope reasonably narrow. Questions like, "How do I set up an accounting system in Excel?" might be a long time waiting.
4. Explain what you've already tried. ("Calculation is set to automatic, but formulas still don't compute") so helpers don't waste your time or theirs.
5. Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
6. If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.

13. ## Re: Calculating number of sick days in a rolling year

Hi,

A very interesting thread, and thanks to nikkie456 for starting it and all the answers. I think there's still a problem with these and I wonder if someone can help correcting this, or me if I've misunderstood.

I'm not using the NETWORKDAYS because I'm interested in overall days, so I'm replacing that with =B2-A2 (EndDate-StartDate), but I think the problem is the same. Here are two scenarios where I think the calculation isn't coming out correctly.

 Start ]End Count Count365 Expected365 01/08/2015 10/10/2015 70 70 70 01/09/2016 01/10/2016 30 100 69
The problem in the example above is that the entire period of the earlier date is counted, not just the part of that period that's within 365 days of the end of the second period.

 Start End Count Count365 Expected365 01/0/2015 30/09/2015 29 29 29 10/09/2016 01/10/2016 21 21 50
The problem with this example is that none of the first period is counted, but only the first nine days should be omitted.

Can anyone help with correcting these issues - I'm sure it will affect the working week version in the same way.

Thanks

14. ## Re: Calculating number of sick days in a rolling year

Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

15. ## Re: Calculating number of sick days in a rolling year

Oh? Sorry, I thought this was a continuation of the original question - the answer isn't complete. My question is the same as the original question, it's not a new question?

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1