I have a .XLXS table with worker names, start times, and end times. I want to show the total hours worked by worker while ignoring overlapping periods. For example if "Bob" works from 0800 to 1400 and also works from 0900 to 1300 his total time for that day should be 6 hours. If "Joe" works 0700 to 0900 his time for that day is 2 hours.
The number of workers varies and six months of data is about 2100 rows.
The formula provided by "barry houdini" to "Formula that will calculate total hours in overlapping date array" works for one worker but I don't know enough about Excel to make it sort for multiple workers.
=SUMPRODUCT((COUNTIFS(B:B,"<"&MIN(B:B)+ROW(INDIRECT("1:"&ROUND((MAX(C:C)-MIN(B:B))*1440,0)))/1440-1/2880,C:C,">"&MIN(B:B)+ROW(INDIRECT("1:"&ROUND((MAX(C:C)-MIN(B:B))*1440,0)))/1440-1/2880)>0)+0)/60
MOD_BY START_DATETIME END_DATETIME total time
bob 1/2/19 17:30 1/2/19 18:45 3.2500
bob 1/2/19 21:00 1/2/19 21:15
bob 1/2/19 21:00 1/2/19 22:00
bob 1/2/19 15:00 1/2/2019 16:00
joe 1/2/19 17:30 1/2/19 18:45
joe 1/2/19 21:00 1/2/19 21:15
joe 1/2/19 21:00 1/2/19 22:00
joe 1/2/19 15:00 1/2/2019 16:00
My objective is to have an output of total hours worked by worker. The formula as provided gives a total for the entire file without breaking it down by worker.