Rolling Count

errollflynn

New Member
Joined
Jan 25, 2021
Messages
24
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a dataset that contains pay period starting and ending dates as well as the shift. I am trying to figure out how to identify instances where an employee has worked a minimum of ten shifts within a 6 month period. The challenge seems to be in calculating a rolling total of sorts and aligning that with a date difference of some type. I'm honestly stumped so any help would be appreciated.



Book3
ABCDEF
1KeyFull NameHoursworkedShift Countpay_period_startpay_period_end
2.8482., DEX63.712.704/03/2204/16/22
3.8482., DEX60.9412.204/10/2204/23/22
4.8482., DEX57.6111.504/17/2204/30/22
5.8482., DEX23.544.704/24/2204/30/22
6SMIT4768SMITH, JOHN9.92201/02/2201/08/22
7MAY4768SMITH, JOHN4.610.901/09/2201/15/22
8MAY4768SMITH, JOHN6.511.301/16/2201/22/22
9MAY4768SMITH, JOHN9.621.901/30/2202/05/22
10MAY4768SMITH, JOHN5.251.102/06/2202/12/22
11MAY4768SMITH, JOHN8.151.602/06/2202/19/22
12MAY4768SMITH, JOHN4.620.902/06/2202/12/22
13MAY4768SMITH, JOHN4.440.902/13/2202/19/22
14MAY4768SMITH, JOHN15.53.102/13/2202/19/22
15MAY4768SMITH, JOHN5.22102/20/2202/26/22
16MAY4768SMITH, JOHN13.212.602/20/2203/05/22
17MAY4768SMITH, JOHN7.061.402/27/2203/05/22
18MAY4768SMITH, JOHN17.163.402/27/2203/05/22
19MAY4768SMITH, JOHN8.081.603/06/2203/12/22
20MAY4768SMITH, JOHN13.592.703/06/2203/12/22
21MAY4768SMITH, JOHN11.262.303/13/2203/19/22
22MAY4768SMITH, JOHN14.242.803/13/2203/26/22
23MAY4768SMITH, JOHN4.83103/20/2203/26/22
24MAY4768SMITH, JOHN11.542.303/20/2203/26/22
25MAY4768SMITH, JOHN4.350.903/27/2204/02/22
26MAY4768SMITH, JOHN8.241.603/27/2204/02/22
27MAY4768SMITH, JOHN6.891.404/03/2204/09/22
28MAY4768SMITH, JOHN11.312.304/03/2204/09/22
29MAY4768SMITH, JOHN9.191.804/10/2204/23/22
30MAY4768SMITH, JOHN18.473.704/10/2204/16/22
31MAY4768SMITH, JOHN3.220.604/17/2204/23/22
32MAY4768SMITH, JOHN27.495.504/17/2204/30/22
33MAY4768SMITH, JOHN8.731.704/24/2205/07/22
34MAY4768SMITH, JOHN19.82404/24/2204/30/22
35MAY4768SMITH, JOHN12.552.505/01/2205/07/22
36MAY4768SMITH, JOHN4.20.805/08/2205/14/22
37MAY4768SMITH, JOHN14.522.905/08/2205/21/22
38MAY4768SMITH, JOHN17.543.505/15/2205/21/22
39MAY4768SMITH, JOHN4.070.805/22/2205/28/22
40MAY4768SMITH, JOHN13.852.805/22/2205/28/22
41MAY4768SMITH, JOHN9.731.906/12/2206/18/22
42MAY4768SMITH, JOHN4.510.906/19/2206/25/22
43MAY4768SMITH, JOHN4.510.906/26/2207/02/22
44MAY4768SMITH, JOHN17.443.506/26/2207/02/22
45MAY4768SMITH, JOHN9.77207/03/2207/09/22
46MAY4768SMITH, JOHN4.660.907/10/2207/16/22
47MAY4768SMITH, JOHN4.92107/24/2207/30/22
48MAY4768SMITH, JOHN4.95107/24/2207/30/22
49MAY4768SMITH, JOHN4.530.907/31/2208/06/22
50MAY4768SMITH, JOHN6.181.208/07/2208/20/22
51MAY4768SMITH, JOHN9.421.908/07/2208/13/22
Sheet1
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
What do you define a 6 month period as? There could be as many as 7 different 6 month period permutations.
-6 to 0, -5 to 1, -4 to 2, -3 to 3, -2 to 4, - 1 to 5, 0 to 6. And it can vary with each pay period.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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