View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs daddylonglegs is offline
external usenet poster
 
Posts: 174
Default Difference in needed and delivered time with workdays only

You just need to tweak Bob's formula slightly, i.e.

=NETWORKDAYS(A1,A2,holidays)-1-(MOD(A1,1)MOD(A2,1))&" days,
"&TEXT(MOD(MOD(A2,1)-MOD(A1,1),1),"hh:mm:ss")

assumes A2 is later than A1 and that both of these are during workdays

"Prema" wrote:

I tried the suggested formula. It works when the the diference is more than
one day. But, if the difference in the dates is less than one day, it still
shows 1 day and the difference in hours. The hours calculated are accurate
though. I would expect the formula to calculate the difference as 0 days,
followed by the hours.

Thanks for the help


"Bob Phillips" wrote:

=NETWORKDAYS(A1,A2,holidays)-(MOD(A2,1)-MOD(A1,1)<0)&" days,
"&TEXT(MOD(MOD(A2,1)-MOD(A1,1),1),"hh:mm:ss")

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Prema" wrote in message
...
A report was needed on 10/01/06 8:28:46. The delivery is on 10/30/06
16:17:20. Need to calculate the difference in days, hours and minutes, but
cannot take into weekends and holidays. Is there a way to do this?