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

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
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.

[TABLE="class: grid, width: 750"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Employee Number[/TD]
[TD]Employee Name[/TD]
[TD]Region[/TD]
[TD]Start Date[/TD]
[TD]Entitlement Days[/TD]
[TD]First Date of Absence[/TD]
[TD]Last Date of Absence[/TD]
[TD]Total Days Absent[/TD]
[TD]Unpaid Days[/TD]
[TD]Payable Days[/TD]
[TD]Days already paid in previous 12 months[/TD]
[TD]Entitlement Days Remaining[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]1000001[/TD]
[TD]Sample 1[/TD]
[TD]1[/TD]
[TD]01/08/2017[/TD]
[TD]9.86[/TD]
[TD]09/10/2017[/TD]
[TD]14/10/2017[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]*[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

* 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,223,711
Messages
6,174,020
Members
452,542
Latest member
Bricklin

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