Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Calculating the First Business Day of the Month.

Calculating the First Business Day of the Month

Written by Allen Wyatt (last updated July 2, 2020)
This tip applies to Excel 97, 2000, 2002, and 2003


Dan is setting up a worksheet for use in his company and needs a way to calculate the first business day of a calendar month. He knows how to calculate the first day of a month, but that day could possibly fall on a weekend or on a holiday.

There are several ways you can calculate the first weekday of a given month. The following formula is a good place to start:

=DATE(YEAR(A1),MONTH(A1),1)+CHOOSE(WEEKDAY(DATE(YEAR(A1),MONTH(A1),1)),1,0,0,0,0,0,2)

This formula assumes that you want the first weekday for the month of whatever date is in cell A1. Thus, if the date in cell A1 is 26 March 2011, the formula assumes you want the first weekday for March 2011.

If you have the Analysis ToolPak installed on your system, then the formula becomes much simpler:

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

The EOMONTH function returns the last day of the month prior to the date in cell A1, and then the WORKDAY function returns the first weekday in the following month. The function is put together like this (using EOMONTH) because WORKDAY is a bit quirky; it assumes that the first parameter is a valid work day. This means that it doesn't check whether the date used in the parameter falls in the Monday through Friday work week. By forcing the parameter to be a day before the month in which you want to determine the first work day and setting the second parameter to 1, the function returns the first actual weekday for the desired month.

The WORKDAY function also allows you to optionally specify that holidays should be taken into account. The easiest way to do this is to set up a list of holiday dates, in a cell range, and then name that range. (How you name a range is discussed in other issues of ExcelTips.) If you give the range a name such as MyHolidays, then you can use the following version of the formula:

=WORKDAY(EOMONTH(A1,-1), 1, MyHolidays)

Here's a neat trick if you want to calculate the beginning work day for any given month in a year. Assume that cell A1 contains a year, such as 2011, and that cell A2 contains a month number, 1 through 12, representing the month for which you want the beginning work day. You can then use this formula to get the desired date:

=WORKDAY(DATE(A1,1,0), A2, MyHolidays)

The way the DATE function is used in this formula returns the last day of the year prior to the year specified in cell A1. Then the value in A2 is used to move forward that number of months, and MyHolidays (as before) accounts for any holidays that may occur in that month.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10199) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Calculating the First Business Day of the Month.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Clip Art Sizing Difficulties

A discussion of problems a reader was having resizing clip art in Word.

Discover More

Adding an Equation Editor Tool

If you use the Equation Editor a lot in creating your documents, you'll benefit by making sure it is accessible as ...

Discover More

Stopping Validated Data from being Overwritten

Data Validation is a great tool to make sure that data entered in a cell meets whatever criteria you decide. Its ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (menu)

Calculating a Date Five Days before the First Business Day

Excel allows you to perform all sorts of calculations using dates. A good example of this is using a formula to figure ...

Discover More

Calculating Months of Tenure

Need to know the number of months between two dates? It's easy to figure out if you use the DATEDIF function.

Discover More

Deciphering a Coded Date

It is no secret that Excel allows you to work with dates in your worksheets. Getting your information into a format that ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.