Seeking Formula Assistance: Calculating Amount of Time in 2 Different Shift Differential Periods

Toddeus5

New Member
Joined
Jan 4, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Greetings,
I've reviewed multiple postings on this site regarding Time Keeping formulas but haven't exactly found a water-proof setup yet.

Situation: KRONOS globally is down.

Background: Ransomware attack.

Assessment: We are manually calculating total hours of employees, and also separating out the amount of hours that fall into 2 different shift differential periods.

Shift Differential 4210: runs from 1500 - 2300
Shift Differential 4250: runs from 2300 - 0700

Example: John works from 1/3/2022, 1830 through 1/4/2022, 0730. Doing the simple math, that is 13 straight hours, and anything after 6 consecutive hours receives an automatic 30 minute lunch break deduction. John's paid hours would be 12.5. Separting this down further, he would spend his 1st 4.5 hours of the shift in differential 4210, and the remaining 8 hours of the shift in differential 4250. How can we reliably calculate these two time values using the reference ranges above?

Recommendations: Seeking yours. : ) Before I embarass you with my current attempts at dissecting this logic, I'd love to hear if others have already successfully conquered this.

Many thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Map2
ABCDEFGHIJKLMNOP
1shift name42503rd shift421042503rd shift421042503rd shift42104250sum
2start hours00:0007:0015:0023:0031:0039:0047:00
30:007:0015:0023:007:0015:0023:00
4startendstarthourendhour
53/01/2022 18:304/01/2022 7:3018:3031:3000:0000:0004:3008:0000:3000:0000:0000:3004:3008:0013:00
6
7
Blad1
Cell Formulas
RangeFormula
I2:K2I2=+F2+1
E3:K3E3=+E2
C5C5=MOD(A5,1)
D5D5=MOD(B5,1)+(TRUNC(A5)<>TRUNC(B5))
E5:H5E5=MAX(0,MIN(F$2,$D5)-MAX(E$2,$C5))
I5:K5I5=MAX(0,MIN(K$2,$D5)-MAX(I$2,$C5))
L5:N5L5=SUMPRODUCT(($E$1:$K$1=L$1)*$E5:$K5)
O5O5=SUM(L5:N5)
 
Upvote 0
without substracting 0.5 hour break
otherwise a solution with VBA
 
Upvote 0
Solution
Thank you so much @BSALV, that seems to be working perfectly. I added a quick extra formula to tackle the lunch break decision. This will save a ton of time. Thank you!
 
Upvote 0
Why do you have 0:00 in column E2? If you have video tutorial please share.

Thank you
 
Upvote 0
you can start working every hour of a certain day, until 23:59 the next day.
So E2 is 0, for the part of shift 4250 between 0:00-7:00 of the 1st day.
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,973
Members
449,059
Latest member
oculus

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