View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arvi Laanemets Arvi Laanemets is offline
external usenet poster
 
Posts: 99
Default Excel2000 VBA: First workday of month

Hi

What is the best way to calculate 1st workday of any month (holidays must be
counted too)?

At moment I have a solution, where a list of dates for some amount of years
is created, with additional column where all dates are labeled as "workday",
"weekend", or "holiday". The code is looking for 1st workday in this list,
starting from 1st of month.

Probably a slightly better solution will be, where the list contains only
holidays. The code will be look for 1st date to be not weekend and not
present in holidays list in given month.

On worksheet, I can easily calculate the 1st workday of month using WORKDAY
function {=WORKDAY(DATE(Year, Month, 0),1,Holydays)}. But it seems, that I
can't use functions from Analysis Toolpack in VBA! Am I right about this, or
is there a way?


Arvi Laanemets