I've been trying to solve an issue for a while now and I'm just not getting the results I need. I have a spreadsheet that captures labor hours at a mechanic shop and I want to find out how many hours of labor per mechanic. The system uses open work-orders to calculate labor hours, however it allows for multiple work-orders to be open for one mechanic and the date/time of those work-orders often overlaps.
For instance, Mechanic A opens three work-orders on the same day:
WO #1 opened on 5/1/2015 @ 12:00 noon, closed at 4 pm.
WO #2 opened on 5/1/2015 @ 1pm and closed at 6pm.
WO #3 opened on 5/1/2015 @ 2pm, closed @ 3pm.
The system will calculate the total labor hours at 4
hrs for WO #1, 5
hrs for WO #2, and 1
hr for WO #3 for a total of 10
hours labor. In reality, the mechanic only did 6
hours of labor since the WO times overlap.
What I need is a formula(s) that will 1) point out where overlap occurs and 2) calculate the actual labor hours, not the system labor hours.
I'd like something that points out where overlap occurs and something that can count/return actual hours. This is easy enough to do in your mind on one-off basis, but I'm working with large data sets and doing these calculations manually is taking a ton of my time. I have played with MIN/MAX and SUMPRODUCT but I can't seem to get the formulas to return the results I'm looking for.
Sample data image for reference: