Hi,
I am trying to calculate the night bonus time which is paid from 22:00 till 6:00, but the shift starts and ends are variable. Say one day it starts from 20:30 till 4:00, but other days 20:00 till 7:00.
I omitted the date in the calculations to make it simpler.
I tried daddylonglegs formula : =MAX(0;MIN(D4;"6:00")-MAX("22:00";C4))*24
also DGagnon formula: =ABS((D4-C4)-IF("22:00">C4;"22:00"-C4;0)-IF(D4>"6:00";D4-"6:00";0))*24
tied also =((INT(D4)-INT(C4))*("22:00"-"6:00")+MEDIAN(MOD(D4;1);"6:00";"22:00")-MEDIAN(MOD(C4;1);"6:00";"22:00"))*24
Nothing is working
I am a newbie, so please be patient with me.
Thanks for help
Rusty
Bookmarks