The number format dd:hh:mm doesn't work for durations over 31:59:59 because the dd part is actually a day of the month so 31 is actually 31st January, go to 32 days and it reverts to 1 (1st Feb).
You either have to use decimals, i.e. just format as a number with 2 decimal places so you'd get 83.68 for the above example (0.68 of a day representing 16:23)....or if you want to see 83:16:23 then try this formula
=NETWORKDAYS(C10,D10)-1-(MOD(C10,1)>MOD(D10,1))&":"&TEXT(D10-C10,"hh:mm")
Note: this gives a text result so it's not so easy to use in any further calculations you may require
Last edited by daddylonglegs; 11-23-2009 at 09:08 AM.
I wasn't suggesting that you change the format of C10 and D10, you can leave those untouched. To get the result in the format "53 days, 05 hrs and 52 min" you can just tweak the formula I suggested, i.e.
=NETWORKDAYS(C10,D10)-1-(MOD(C10,1)>MOD(D10,1))&" days, "&TEXT(D10-C10,"hh"" hrs and ""mm""min""")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks