I have found the difference between the below two datetime stamps and formatted in time format "37:30:55". I have excluded the non working hours and weekends and holidays in it. By using the below formula I got the result as 17:20:39, but when I calculate it manually, I get a different result 16:51:00 which is the correct one. Can anyone help me arrive at the correct result.. Your help will be highly appreciated.
Start Date=H13= 9/14/11 11:09 AM
End date=I13= 9/16/11 10:30 AM
Working hrs start time=M2= 9:30 AM
Working hrs end time=M3= 6:30 PM
Holiday List = N2:N4
Formula used: (NETWORKDAYS(H13,I13,$N$2:$N$4)-1)*($M$3-$M$2)+IF(NETWORKDAYS(I13,I13,$N$2:$N$4),MEDIAN(MOD(I13,1),$M$3,$M$2),$M$3)-MEDIAN(NETWORKDAYS(H13,H13,$N$2:$N$4)*MOD(H13,1),$M$3,$M$2)
Result = 17:20:39
Start Date=H13= 9/14/11 11:09 AM
End date=I13= 9/16/11 10:30 AM
Working hrs start time=M2= 9:30 AM
Working hrs end time=M3= 6:30 PM
Holiday List = N2:N4
Formula used: (NETWORKDAYS(H13,I13,$N$2:$N$4)-1)*($M$3-$M$2)+IF(NETWORKDAYS(I13,I13,$N$2:$N$4),MEDIAN(MOD(I13,1),$M$3,$M$2),$M$3)-MEDIAN(NETWORKDAYS(H13,H13,$N$2:$N$4)*MOD(H13,1),$M$3,$M$2)
Result = 17:20:39