View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Steve C Steve C is offline
external usenet poster
 
Posts: 119
Default NETWORKDAYS thru 2020

Ron,

Thanks for the ideas. I realized going in it probably would take some time
to compile all the dates, but the formulas you gave me will help.
--
Steve C


"Ron Rosenfeld" wrote:

On Fri, 13 Apr 2007 07:32:07 -0700, Steve C
wrote:

Is there an easy way to create a list of all non-working days (Sat & Sun,
major holidays) between now and the year 2020? I want to use this range as
the "holidays" argument in the NETWORKDAYS function.

I could create this list by hand, but if it can be done with programming,
all the better! Thanks for any ideas you can give me.


Since NETWORKDAYS already excludes Saturdays and Sundays, I don't understand
why you would want to include those dates in your function.

I think you really only need a list of the holiday dates. Perhaps you could
find such a list on the web.

If not, then some are easy:

New Years
Christmas
July 4.

Some are a little more complicated:

Labor Day
Thanksgiving

Some are probably best done by looking them up in a table:

Easter

Some require knowledge of the rules for the particular corporation:

If Christmas is on a Saturday, is Friday a working day?

A formula for New Years might be:

=DATE(ROWS($1:2008),1,1)

as you copy/drag down, it will give you Jan 1 for the years from 2008 to
however far down you drag it.

Labor Day is the first Monday in September, so:

=DATE(ROWS($1:2007),8,31)-WEEKDAY(DATE(ROWS($1:2007),8,31)+6)+8

and copy/drag down.

and so forth.
--ron