Calculating working hours with night shift premiums
Hi,
calculating working hours isn't too complicated. However, if the working time is partly during night shift, I find it challenging. I need to calculate the amount of hours that are in the time span of the night shift.
For example, night shift hours are between 8 pm and 6 am. Now the working hours can start/end anytime before, during or after the night shift:
Day 1: Start 5 pm, End 10 pm = 2 night shift hours
Day 2: Start 1 am, End 10 am = 5 night shift hours
etc.
What would be the easiest approach to this? The best way I can think of right now is to daisy-chain IF functions which results in a very long formula.
Thanks
paps.