OK, I think it's the notation, I didn't convert correctly for your region, for your version 2.5 should be 2,5.....or better to stick to fractions as I have those elsewhere, i.e.
=IF(C3="";"";MEDIAN(0;5/2-MOD(B3+1/4;1)-WEEKDAY(A3+B3+1/4);MOD(C3-B3;1)))
see attached file with random dates and times that I used for testing. Press F9 to generate different dates and times
The 21:00 to 06:00 formula I suggested will pick up all times in that period, even at both ends of the day, e.g. if the shift is 05:00 to 01:00 (next day) it will give a result of 5:00 (1 hour at the start of the day and 4 at the end). You may not have any shifts like that......
Bookmarks