View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Calculate minutes between dates based on 9hr work days

If you want it in minutes

=((NETWORKDAYS(A1,A2)-(WEEKDAY(A1,2)<6)-(WEEKDAY(A2,2)<6))*9
+((WEEKDAY(A1,2)<6)*(MIN(MAX(0,TIME(17,0,0)-MOD(A1,1)),TIME(8,0,0)))
+(WEEKDAY(A2,2)<6)*(MIN(MAX(MOD(A2,1)-TIME(8,0,0),0),TIME(8,0,0))))*24
-SUMPRODUCT(--(WEEKDAY(holidays,2)<5),--(ISNUMBER(MATCH(holidays,ROW(INDIRECT(INT(A1)+1&": "&INT(A2)-1)),0))))*9)*60

--
__________________________________
HTH

Bob

"JQS" wrote in message
...
Need to calculate "business minutes" between dates.
ie...08/29/08 4:00p to 9/2/08 9:00a result in 120 minutes (due to 8a-5p
work day, less weekends and holidays). Can you help? thank you
--
JQS