Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Modifying Networkdays

Hi,

I have the below code that utilizies the NETWORKDAYS capability of Excel. My
question is is it possible to Internally/Programaticaly modify how
NETWORKDAYS functions? I know that the "9.5" sets the hours per day, however,
I want to be able to set "When" the work day starts; "When" and "Howlong"
lunchtime is and "When the end of the day is.

Work Start - 7AM
Lunchtime - 11:30 till 12:30
End Day - 5PM


=IF(F14<FALSE,(9.5+(MOD(F14,1)-MOD(E14,1))*24+(NETWORKDAYS(E14,F14)-2)*9.5)/24,"")


Thanks In Advance,
R
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Modifying Networkdays

Rob,
Look here ... it solves some of your problem:

http://www.cpearson.com/excel/DateTimeWS.htm

"Rob" wrote:

Hi,

I have the below code that utilizies the NETWORKDAYS capability of Excel. My
question is is it possible to Internally/Programaticaly modify how
NETWORKDAYS functions? I know that the "9.5" sets the hours per day, however,
I want to be able to set "When" the work day starts; "When" and "Howlong"
lunchtime is and "When the end of the day is.

Work Start - 7AM
Lunchtime - 11:30 till 12:30
End Day - 5PM


=IF(F14<FALSE,(9.5+(MOD(F14,1)-MOD(E14,1))*24+(NETWORKDAYS(E14,F14)-2)*9.5)/24,"")


Thanks In Advance,
R

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default Modifying Networkdays

Your post doesn't mention what the MOD functions are doing, so I won't
attempt to address them; I mocked up data in cells A1:B4 to hold start
and end times, like this:
Work Start 7:00 AM
lunch start 11:30 AM
lunch end 12:30 PM
work end 5:00 PM

....and start / end calendar days for use by the NETWORKDAYS function
in B6:B7. I wrote this formula to get the total number of hours:
=NETWORKDAYS(B6,B7)*(((B2-B1)*24)+((B4-B3)*24))

Something I noticed about your post: you're using 9.5 hours for a full
day, but with an hour for lunch and those start / stop times, the
total is 9 hours.

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
Help Modifying this Formula .... Mhz New Users to Excel 8 July 30th 06 11:33 AM
Modifying an If Statement carl Excel Worksheet Functions 1 February 1st 06 08:12 PM
Modifying VLookUp carl Excel Worksheet Functions 3 December 6th 05 12:32 AM
Modifying a document mitch Excel Discussion (Misc queries) 2 February 3rd 05 09:13 PM
help Modifying ParTeeGolfer Excel Worksheet Functions 0 January 27th 05 10:07 PM


All times are GMT +1. The time now is 10:10 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"