Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nilesh Inamdar
 
Posts: n/a
Default MS Excel Function - Networkdays

Dear Sir,
We are trying to workout with networkdays function uses in Excel. but it is
taking the 5 days a week ( 2 holiday in week). but my requirement is 6 days a
week. I have gone throught the documents available on net. the still unable
to find the default holiday used by the networkdays function. & how to work
out with this. Please find the formula which I am using. Kindly help me in
this matter.

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(INT (StartDT),HolidayList,0)))),0,ABS(IF(INT(StartDT)= INT(EndDT),ROUND(24*(EndDT-StartDT),2),(24*(DayEnd-DayStart)*(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+INT(24*(((EndDT-INT(EndDT))-(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),ROUND((24*(DayEnd-DayStart)),2))))))

Thanks & Regards
  #2   Report Post  
Domenic
 
Posts: n/a
Default


See if my contribution here helps...

http://www.mrexcel.com/board2/viewto...724&highlight=

Nilesh Inamdar Wrote:
Dear Sir,
We are trying to workout with networkdays function uses in Excel. but
it is
taking the 5 days a week ( 2 holiday in week). but my requirement is 6
days a
week. I have gone throught the documents available on net. the still
unable
to find the default holiday used by the networkdays function. & how to
work
out with this. Please find the formula which I am using. Kindly help me
in
this matter.

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(INT (StartDT),HolidayList,0)))),0,ABS(IF(INT(StartDT)= INT(EndDT),ROUND(24*(EndDT-StartDT),2),(24*(DayEnd-DayStart)*(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+INT(24*(((EndDT-INT(EndDT))-(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),ROUND((24*(DayEnd-DayStart)),2))))))

Thanks & Regards



--
Domenic
------------------------------------------------------------------------
Domenic's Profile: http://www.excelforum.com/member.php...o&userid=10785
View this thread: http://www.excelforum.com/showthread...hreadid=320571

  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

There is no "default" holiday list. You must supply it.

And the built-in function assumes a 5-day workweek. If you have a 6-day
workweek, this function will not help you.

You need to calculate the number of elapsed days. From that you need to
subtract the number of regular days off (Saturdays? Sundays?) and also
subtract the number of holidays.

At www.cpearson.com you can find a formula to determine the number of Mondays
between two dates. That can be modified to check for your day off.

As for the number of holidays, let's say the starting date is in A1 and the
ending date in B1, and yourlist does not include any holidays fall on the day
off, you can use COUNTIF:

=COUNTIF(HolidayList,"="&A1)-COUNTIF(HolidayList,""&B1)



On Fri, 26 Nov 2004 05:53:02 -0800, "Nilesh Inamdar" <Nilesh
wrote:

Dear Sir,
We are trying to workout with networkdays function uses in Excel. but it is
taking the 5 days a week ( 2 holiday in week). but my requirement is 6 days a
week. I have gone throught the documents available on net. the still unable
to find the default holiday used by the networkdays function. & how to work
out with this. Please find the formula which I am using. Kindly help me in
this matter.

=IF(AND(INT(StartDT)=INT(EndDT),NOT(ISNA(MATCH(IN T(StartDT),HolidayList,0)))),0,ABS(IF(INT(StartDT) =INT(EndDT),ROUND(24*(EndDT-StartDT),2),(24*(DayEnd-DayStart)*(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)+INT(24*(((EndDT-INT(EndDT))-(StartDT-INT(StartDT)))+(DayEnd-DayStart))/(24*(DayEnd-DayStart))))+MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)+(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),ROUND((24*(DayEnd-DayStart)),2))))))

Thanks & Regards


  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Nilesh Inamdar" <Nilesh wrote...
Dear Sir,


You need to get used to including the possibility that women can and do
respond in English language newsgroups, even this one.

We are trying to workout with networkdays function uses in Excel. but it
is taking the 5 days a week ( 2 holiday in week). but my requirement is
6 days a week. I have gone throught the documents available on net. the
still unable to find the default holiday used by the networkdays function.
& how to work out with this. Please find the formula which I am using.
Kindly help me in this matter.

=IF(AND(INT(StartDT)=INT(EndDT),
NOT(ISNA(MATCH(INT(StartDT),HolidayList,0)))),0 ,
ABS(IF(INT(StartDT)=INT(EndDT),ROUND(24*(EndDT-StartDT),2),
(24*(DayEnd-DayStart)*(MAX(NETWORKDAYS(StartDT+1,EndDT-1,HolidayList),0)
+INT(24*(((EndDT-INT(EndDT))-(StartDT-INT(StartDT)))+(DayEnd-DayStart))
/(24*(DayEnd-DayStart))))+MOD(ROUND(((24*(EndDT-INT(EndDT)))-24*DayStart)
+(24*DayEnd-(24*(StartDT-INT(StartDT)))),2),
ROUND((24*(DayEnd-DayStart)),2))))))


One complication seems to be that you're handling time within StartDT and
EndDT. NETWORKDAYS doesn't do this. Put any workday in cell A1, and

=NETWORKDAYS(A1,A1)

will return 1.

If you want NETWORKDAYS functionality for 6 workdays per week, and if, say,
Saturday were always a workday unless it was included in HolidayList, the
simplest formula would be

=NETWORKDAYS(StartDT,EndDT,HolidayList)
+SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(INT(StartDT)&":"&INT(EndDT)) ))=7),
--(COUNTIF(HolidayList,ROW(INDIRECT(INT(StartDT)&":" &INT(EndDT))))=0))

If the nonworkday could vary from week to week, easiest to include the
nonworkdays in HolidayList and use the formula

=SUMPRODUCT(--(COUNTIF(HolidayList,ROW(INDIRECT(INT(StartDT)
&":"&INT(EndDT))))=0))


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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Access Module coded converted to Excel Function Adam Excel Discussion (Misc queries) 1 December 23rd 04 02:48 PM
Excel function help facilities RPS Excel Discussion (Misc queries) 1 December 8th 04 02:36 AM
I cant use englisch function names in a swedich version of excel PE Excel Discussion (Misc queries) 2 December 7th 04 01:00 AM
Statistical Excel Function Question within Excel 2000... Drew H Excel Worksheet Functions 3 October 31st 04 06:55 PM


All times are GMT +1. The time now is 09:48 PM.

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"