Formula for counting occurrences by individual within a rolling year period

naughtsncross

New Member
Joined
Oct 13, 2017
Messages
4
Good Afternoon!

I am hoping that someone out there may be able to help me with a hurdle I have reached.

In a (large) nutshell, I am trying to design an absence spreadsheet to be used to calculate whether someone is entitled to receive sick pay. I have the spreadsheet calculating a person's annual entitlement based on their length of service, the dates of the new absence and the number of days to be paid this time. What I now need to do is to add a cell which looks at a list of previous absences and then shows how many paid days the person has received in the 365 days prior to the start date of the current absence.

I have got as far as a formula which pulls back the total number of days paid using the employee number, I am just struggling with limiting it to absences within the last 365 days.

If you are still with me, I will attach a sample of what I am working on (when I can work out how to do this!)

Hope you can help!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Re: Need assistance with a formula for counting occurrences by individual within a rolling year period

I can't seem to attach a file so will summarise here:

My main tab is set up as this, this is entered each month.

ABCDEFGHIJKL
1Employee NumberEmployee NameRegionStart DateEntitlement DaysFirst Date of AbsenceLast Date of AbsenceTotal Days AbsentUnpaid DaysPayable DaysDays already paid in previous 12 monthsEntitlement Days Remaining
21000001Sample 1101/08/20179.8609/10/201714/10/2017633*
3

<tbody>
</tbody>

* This is where I need to amend the formula to restrict the response to the last 365 days.
Cell K2 currently reads: =SUMIFS('Sheet2'!K:K, 'Sheet2'!A:A, 'Sheet1'!A2)
 
Upvote 0
Re: Need assistance with a formula for counting occurrences by individual within a rolling year period

Can anyone help me?
 
Upvote 0
Re: Need assistance with a formula for counting occurrences by individual within a rolling year period

I've managed to do it! It's taken me 3 days but it's now working.
I added in a column after payable days to calculate the date 12 months prior to the absence start date, then swapped the IFS statements around to look at the dates first, then pull back the number of payable days after that date that matched the employee number.

=SUMIFS('Sheet2'!K:K, 'Sheet2'!G:G,">"&Sheet1!L2, 'Sheet2'!A:A, 'Sheet1'!A2)
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top