Yes, you are correct - the formula I suggested only works if the date/time in A1 is within working hours - to make it work for any date/time in A1 try this version
Formula:
=WORKDAY(A1-1,CEILING((B1+MEDIAN(NETWORKDAYS(A1,A1,holidays)*MOD(A1,1),D$2,E$2)-D$2)/(E$2-D$2),1),holidays)+MEDIAN(NETWORKDAYS(A1,A1,holidays)*MOD(A1,1),D$2,E$2)+B1-CEILING(MEDIAN(NETWORKDAYS(A1,A1,holidays)*MOD(A1,1),D$2,E$2)+B1-D$2,E$2-D$2)+E$2-D$2
Note: in your original formula is K2 always within working hours? If not then I think you could get incorrect results if K2 is after _end_of_day on a working day
Bookmarks