79168039

Date: 2024-11-07 20:56:41
Score: 1.5
Natty:
Report link

Assuming all shift data is ordered as it is in the example, you could add a helper column to indicate next AM clocking out for the same shift. For example enter in I3 and fill-down:

=(A2 = A3) * (B2 = B3) * (C2 = C3) * (D2 + 1 = D3) * (G2 = "PM") * (G3 = "AM")

Result 1

Then in Productivity:

=COUNTIFS('Days Worked'!A:A, ">=" & A2, 'Days Worked'!A:A, "<=" & B2, 'Days Worked'!B:B, D2, 'Days Worked'!C:C, E2,
'Days Worked'!I:I, "<>1")

Result 2


Please let me know if you have Excel for Microsoft 365, then I could update the answer with dynamic array formulas.

Reasons:
  • RegEx Blacklisted phrase (2.5): Please let me know
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • High reputation (-1):
Posted by: nkalvi