LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


 
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
Finding second-to-last workday of month Brian Excel Worksheet Functions 4 December 22nd 09 12:17 AM
Count the number of workday in a month YY san.[_2_] Excel Worksheet Functions 5 October 28th 09 08:31 PM
Compare & sum previous month production by workday. Cindy Excel Discussion (Misc queries) 9 April 28th 09 08:58 AM
workday with month functions Monique Excel Worksheet Functions 5 October 30th 07 01:19 AM
Excel inventory Sheet for workday month Monique Excel Worksheet Functions 1 April 26th 07 12:02 AM


All times are GMT +1. The time now is 10:26 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"