Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Networkdays equivalent for minutes

I'm trying to calculate the number of minutes between two dates and times but
I want the calculation to consider only the work day of 8:30AM to 5:00PM. So
if cell A1 has 12/13/07 4:59 PM and cell B1 has 12/14/07 8:30 AM, I need cell
C1 to calculate an answer of 00:01:00 (when formatted as HH:MM:SEC) and not
the 15:31:00 that I would get if I simply subtracted B1 from A1. The tricky
part is that I have weekends that I need to account for as well. Any
suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Networkdays equivalent for minutes

=NETWORKDAYS(A1,B1)-2+((WEEKDAY(A1,2)<6)*(MAX(0,TIME(17,0,0)-MOD(A1,1))))-((WEEKDAY(A1,2)<6)*(MAX(0,TIME(8,30,0)-MOD(A1,1))))
+((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(8,30,0))))-((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(17,0,0))))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jon Ratzel" <Jon wrote in message
...
I'm trying to calculate the number of minutes between two dates and times
but
I want the calculation to consider only the work day of 8:30AM to 5:00PM.
So
if cell A1 has 12/13/07 4:59 PM and cell B1 has 12/14/07 8:30 AM, I need
cell
C1 to calculate an answer of 00:01:00 (when formatted as HH:MM:SEC) and
not
the 15:31:00 that I would get if I simply subtracted B1 from A1. The
tricky
part is that I have weekends that I need to account for as well. Any
suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default Networkdays equivalent for minutes

Thanks for the fast response - it works great!

Jon




"Bob Phillips" wrote:

=NETWORKDAYS(A1,B1)-2+((WEEKDAY(A1,2)<6)*(MAX(0,TIME(17,0,0)-MOD(A1,1))))-((WEEKDAY(A1,2)<6)*(MAX(0,TIME(8,30,0)-MOD(A1,1))))
+((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(8,30,0))))-((WEEKDAY(B1,2)<6)*(MAX(0,MOD(B1,1)-TIME(17,0,0))))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Jon Ratzel" <Jon wrote in message
...
I'm trying to calculate the number of minutes between two dates and times
but
I want the calculation to consider only the work day of 8:30AM to 5:00PM.
So
if cell A1 has 12/13/07 4:59 PM and cell B1 has 12/14/07 8:30 AM, I need
cell
C1 to calculate an answer of 00:01:00 (when formatted as HH:MM:SEC) and
not
the 15:31:00 that I would get if I simply subtracted B1 from A1. The
tricky
part is that I have weekends that I need to account for as well. Any
suggestions?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting total minutes into hours and minutes in Excel colette Excel Worksheet Functions 11 December 26th 07 07:24 PM
Convert Decimal hours and Minutes to minutes please. Steved Excel Worksheet Functions 13 July 5th 06 05:33 AM
converting Days Hours & minutes into just minutes in excel Six Sigma Blackbelt Excel Discussion (Misc queries) 5 April 28th 06 09:45 PM
how to change a decimal number (minutes) into hours and minutes? Erwin Excel Discussion (Misc queries) 2 November 5th 05 04:22 PM
add column of minutes, show total in hours & minutes glider pilot Excel Worksheet Functions 1 December 30th 04 10:27 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"