ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   First Business day of the month? (https://www.excelbanter.com/excel-programming/344466-first-business-day-month.html)

Ben

First Business day of the month?
 
Hi all,

Is there a quick way to find the first business day of the month? I could
find it using a loop in conjuction with the Weekday function. But I was
wondering if there is a more concise and elegant approach. Thanks for
sharing your thoughts.

Ben

--


Bob Phillips[_6_]

First Business day of the month?
 
Try =workday(DATE(2005,11,0),1)

where 11 is the month number.

WORKDAY is part of the Analysis Toolpak, so that needs to be installed.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ben" wrote in message
...
Hi all,

Is there a quick way to find the first business day of the month? I could
find it using a loop in conjuction with the Weekday function. But I was
wondering if there is a more concise and elegant approach. Thanks for
sharing your thoughts.

Ben

--




Ron Rosenfeld

First Business day of the month?
 
On Wed, 2 Nov 2005 06:27:02 -0800, Ben wrote:

Hi all,

Is there a quick way to find the first business day of the month? I could
find it using a loop in conjuction with the Weekday function. But I was
wondering if there is a more concise and elegant approach. Thanks for
sharing your thoughts.

Ben


With some date of the month in A1:

=WORKDAY(A1-DAY(A1),1)

will do it as a worksheet function, provided you have the Analysis Tool Pack
installed. The ATP can also be used in a VBA routine.

Without ATP, note that, where Dt=some date in a month,

Dt-Day(Dt)

will always be the last day of the previous month. You could then loop through
weekends and optionally also through Holidays.


--ron


All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com