Why not just use a formula?
Assuming weekends get included
=(INT(E2-D2)*("18:00"-"09:00") +MEDIAN(MOD(E2,1),"18:00","09:00") -MEDIAN(MOD(D2,1),"18:00","09:00"))*24
Why not just use a formula?
Assuming weekends get included
=(INT(E2-D2)*("18:00"-"09:00") +MEDIAN(MOD(E2,1),"18:00","09:00") -MEDIAN(MOD(D2,1),"18:00","09:00"))*24
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber