Hi. I've been wracking my brain for days trying to get the correct format to display in my table. I've (hopefully) successfully calculated time between two dates, excluding weekends, holidays, and outside of business hours (see below for full formula).
What I'm stuck on is the FORMAT of the data. I need the cell to display "##d ##h ##m". I've come up with "dd\d hh\h mm\m". The cell now displays correctly, but the data is wrong. Please help with either my formula to calculate the time span, or the format of the cell, please.
Formula to calculate time span : =(NETWORKDAYS(A2,B2,Holidays!A:A)-1)*("20:00"-"08:00")+IF(NETWORKDAYS(B2,B2,Holidays!A:A),MEDIAN(MOD(B2,1),"20:00","08:00"),"20:00")-MEDIAN(NETWORKDAYS(A2,A2,Holidays!A:A)*MOD(A2,1),"20:00","08:00")
Business hours are 8am to 8pm
Format of the cells : d\d hh\h mm\m
A1
09/10/2015 12:51 AM
03/27/2015 4:15 PM
03/20/2014 9:00 AM
B1
09/14/2015 10:55 AM
09/16/2015 11:59 PM
09/16/2015 11:59 PM
Unformatted Results
1.121527778
60.15625
188.4583333
Formatted
1d 02h 55m
29d 03h 45m
6d 11h 00m
Should look like
2d 2h 55m
120d 3h 44m
376d 11h 0m
"Raw" time
26 hours 55 minutes
1443 hours 44 minutes
4523 hours 0 minutes
I need the result in BUSINESS DAYS and HOURS, please
Bookmarks