Thanks so much for your help, and the follow up! Working beautifully!
Just to let you know, in function Night_S (see below), I added 3 hours to the end time so that overtime work can be processed as from the same day. You can change it if you see it causes a problem in real life. Regards Pierre Public Function Night_S() Dim C_ell As Range Worksheets("Sheet1").Select For Each C_ell In Range("A2", Cells(Rows.Count, 1).End(xlUp)) F_user_Night (C_ell.Offset(0, 3)) If User_End < User_Start Then If C_ell.Offset(0, 6) < User_End + 3 Then C_ell.Offset(0, 6) = C_ell.Offset(0, 6) + 24 C_ell.Offset(0, 5) = C_ell.Offset(0, 5) - 1 End If End If Next End Function [/CODE]