
Originally Posted by
daddylonglegs
OK, perhaps my comments weren't clear but the formula I suggested will calculate the hours worked within a defined period, even if the shift starts one day and ends the next.
See the attached sheet.
In B10:C20 I have put some formulas that generate random shifts, this is just for testing purposes. If you find that useful you can press F9 to re-generate or just overwrite these with your own fixed times.
The formula in D10 calculates the hours between the Lower and Upper bounds. The formula in E10 calculates other hours, i.e. those outside the time period. LB needs to be earlier than UB
Obviously this gets more complicated if you want to take the day of the week into account.....
regards, daddylonglegs
Bookmarks