Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Zewer
 
Posts: n/a
Default Modify the official None-working days in the "NETWORKDAYS" Functio

I have a problem working with this function:

NETWORKDAYS(start_date,end_date,holidays)

This function calculates the number of "Working Dates" between any two given
dates. My problem is that this function calculates Saturday and Sunday as
none-working days, but in the country Im working in, we have Friday and
Saturday as our none-working days. Therefore, it gives an inconsistent
answer. Do you have any idea if can I make the function start calculating
Friday and Saturday as the official none-working days?!

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Zewer,

Try this

=SUMPRODUCT(INT((MAX(end_date,start_date)-WEEKDAY(MAX(end_date,start_date)+1
-{1;2;3;4;5})-MIN(end_date,start_date)+8)/7))
-SUMPRODUCT(ISNUMBER(MATCH(WEEKDAY(holidays),{1;2;3 ;4;5},0))*(holidays=MIN(
end_date,start_date))*(holidays<=MAX(end_date,star t_date)))

--
HTH

Bob Phillips

"Zewer" wrote in message
...
I have a problem working with this function:

NETWORKDAYS(start_date,end_date,holidays)

This function calculates the number of "Working Dates" between any two

given
dates. My problem is that this function calculates Saturday and Sunday as
none-working days, but in the country I'm working in, we have Friday and
Saturday as our none-working days. Therefore, it gives an inconsistent
answer. Do you have any idea if can I make the function start calculating
Friday and Saturday as the official none-working days?!



  #3   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

See Larson's contrib in: http://tinyurl.com/czdzl

Zewer wrote:
I have a problem working with this function:

NETWORKDAYS(start_date,end_date,holidays)

This function calculates the number of "Working Dates" between any two given
dates. My problem is that this function calculates Saturday and Sunday as
none-working days, but in the country Im working in, we have Friday and
Saturday as our none-working days. Therefore, it gives an inconsistent
answer. Do you have any idea if can I make the function start calculating
Friday and Saturday as the official none-working days?!

  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Mon, 8 Aug 2005 01:49:02 -0700, "Zewer"
wrote:

I have a problem working with this function:

NETWORKDAYS(start_date,end_date,holidays)

This function calculates the number of "Working Dates" between any two given
dates. My problem is that this function calculates Saturday and Sunday as
none-working days, but in the country I’m working in, we have Friday and
Saturday as our none-working days. Therefore, it gives an inconsistent
answer. Do you have any idea if can I make the function start calculating
Friday and Saturday as the official none-working days?!


Probably the simplest method is to add 1 to all of your dates within the
NetWorkdays function.

=NETWORKDAYS(start_date+1,end_date+1,holidays+1)

However, if you use the optional holidays parameter, I believe you must enter
the formula as an **array** formula and that it will work OK that way. To
enter as an *array* formula, after typing the formula into the formula bar,
hold down <ctrl<shift while hitting <enter. Excel will place braces {...}
around the formula.


--ron
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
How to Add 5 working days Trying2Learn Excel Discussion (Misc queries) 1 June 20th 05 12:52 PM
calculate number of working days philc Excel Worksheet Functions 2 June 1st 05 07:48 AM
Working time and days Nortos Excel Worksheet Functions 5 May 6th 05 04:17 PM
Working time and days Nortos Excel Discussion (Misc queries) 1 May 6th 05 03:47 PM
Calculating Working Days will Excel Worksheet Functions 5 March 22nd 05 12:44 PM


All times are GMT +1. The time now is 05:21 PM.

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

About Us

"It's about Microsoft Excel"