LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Count the remaining weekdays in a data range excluding holidays and start/end dates

On Wed, 24 Jul 2013 16:27:53 +0100, Addatone wrote:

I tried removing the End Date from the formula but get the #VALUE!.


Ithink the formula needs to be adjusted to only exclude holidays and the
Start Date.


Please provide an example where it is excluding other dates. It should not be.

My concern then is when the Start Date and End Date are the
same, e.g 07/31/2013. What happens?


In that case, or any case (such as your August example), where there is one or less WorkDays, an error will result.
A quick fix is to test for that condition:


=IF(NETWORKDAYS(StartDate,EndDate,Holidays)<=1,0,S UMPRODUCT(
--(WEEKDAY(WORKDAY(StartDate,ROW(INDIRECT("1:"&-1+
NETWORKDAYS(StartDate,EndDate,Holidays))),Holidays ))=DOW)))

However, there is another potential problem -- can StartDate ever be on a weekend or holiday? And, if so, how should that be handled? (If not, I still have to make some changes, but I don't have time right now).
Later.
 
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
difference between two dates & time by excluding holidays & weeken Rohit Excel Programming 1 February 20th 09 12:02 PM
Calculates Dates Based on 7 day week excluding Holidays Daviv Excel Discussion (Misc queries) 1 January 17th 07 07:02 PM
fill a series of dates excluding holidays gsh20 Excel Worksheet Functions 1 August 25th 05 12:33 AM
How do you count work days excluding weekends and holidays? Hausma Excel Discussion (Misc queries) 2 April 8th 05 07:39 PM
formula to calculate # of days between dates, excluding holidays abs2299 Excel Discussion (Misc queries) 8 March 3rd 05 02:21 AM


All times are GMT +1. The time now is 08:36 AM.

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"