Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Public Holidays

Hi,

Please help.

Currently I have a formula in my macro with the below logic.

If today is workday (Mon) then = today -3
If today is workday (Tues to Friday) then = today-1
If today is Weekend (Sat) then = today - 1
If today is Weekend (Sun) then = today -2

The problem I have is when there's a public holiday.

How do I account for a public holiday? How can I store the public
holidays within the macro?

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Public Holidays

Maybe you could just use =workday() from the analysis toolpak (tools|addins to
install it).

And you could put the holidays in a column on a (hidden?) worksheet.

(Maybe you won't need a macro.)

But you could store the list of holidays on a worksheet and still use them in
your code, too.

missk wrote:

Hi,

Please help.

Currently I have a formula in my macro with the below logic.

If today is workday (Mon) then = today -3
If today is workday (Tues to Friday) then = today-1
If today is Weekend (Sat) then = today - 1
If today is Weekend (Sun) then = today -2

The problem I have is when there's a public holiday.

How do I account for a public holiday? How can I store the public
holidays within the macro?

Thank you.


--

Dave Peterson
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
Holidays JB Excel Worksheet Functions 2 January 10th 07 12:27 PM
Considering Holidays Nicole Seibert Excel Programming 4 July 3rd 06 01:33 PM
holidays bamboozled Excel Discussion (Misc queries) 4 May 29th 06 04:08 PM
Holidays Jerry Levinson Excel Worksheet Functions 2 January 14th 06 12:39 AM
Account for Public Holidays POM Excel Discussion (Misc queries) 0 March 2nd 05 11:47 AM


All times are GMT +1. The time now is 09:04 AM.

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"