Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Calculating a Date Five Days before the First Business Day.

Calculating a Date Five Days before the First Business Day

Written by Allen Wyatt (last updated December 17, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021


DeWayne has a date in cell A1, and it is easy to extract the month from that date. What he needs to do, however, is to calculate the date that is five calendar days before the first business day of the month. Thus, if the date in cell A1 is October 10, 2022, then the first business day of the month would be October 3 and five days before that would be September 28. (It is important to note that the five-day adjustment is based on calendar days, not on business days.)

There are many different formulas you can use to derive such a date. The shortest one that I've come across is this one:

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

It subtracts the day of the month from the current date, which gives the last day of the previous month. Using this as a parameter for the WORKDAY function, along with a second parameter of 1, gives you the first workday (business day) of the current month. Five days is then subtracted from this date, giving the desired result.

You could also, if you prefer, use the EOMONTH function within the formula, in this manner:

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

The EOMONTH(A1,-1) portion of the formula gives the same result as A1-DAY(A1), which is the last day of the previous month.

You could also use the third parameter of the WORKDAY function to take holidays into account, if you desire. The easiest way to do this is in this manner:

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

In this usage, MyHolidays is a name you assign to a range of cells, where each cell contains the date of a holiday during the year.

It should be noted that the WORKDAY function assumes that the non-workdays are Saturday and Sunday. This might not always be the case, however. If you want the ability to specify different non-workdays, then you should investigate the WORKDAY.INTL function, which was introduced in Excel 2010. It works much the same as the WORKDAY function, except it adds a new parameter that is specified in the third position. For instance, let's say that DeWayne runs a barber shop that is closed on Sunday and Monday. (These are the non-business days for DeWayne's business.) In that case, you could calculate the date that is five days before the the first business day of the month with the following:

=WORKDAY.INTL(A1-DAY(A1),1,2,MyHolidays)-5

In this case, if the date in cell A1 is still October 10, 2022, then the first business day of the month would be October 1 (a Saturday, which is a business day for DeWayne's barber shop), and five days before that would be September 26.

Note the addition of the third parameter, in this case the value 2. This value indicates which days of the week are your non-workdays. The value can be one of the following:

Value Non-Workdays
1 Saturday/Sunday
2 Sunday/Monday
3 Monday/Tuesday
4 Tuesday/Wednesday
5 Wednesday/Thursday
6 Thursday/Friday
7 Friday/Saturday
11 Sunday
12 Monday
13 Tuesday
14 Wednesday
15 Thursday
16 Friday
17 Saturday

Other than the added third parameter, the WORKDAY.INTL function works the same as the WORKDAY function.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12179) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, Excel in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Excel here: Calculating a Date Five Days before the First Business Day.

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

Extra Spaces after AutoText Substitutions

AutoText is a great tool for inserting standard information in your documents. It is also possible, however, to get ...

Discover More

Printing Document Properties

Word maintains quite a bit of information about a document in a special collection of items called "properties." You can ...

Discover More

Exploded Pie Chart Sections

Want to change the groupings used by Excel when it creates pie charts? Your options are limited, as you learn in this tip.

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Determining If a Year is a Leap Year

Need to figure out if a given year is a leap year? It's not as easy as you think! This tip provides a plethora of ways ...

Discover More

Date for Next Wednesday

When working with dates, it is often helpful to be able to calculate some date in the future based on a starting date. ...

Discover More

Calculating the Last Day in a Week Number

Given a particular week number for a year, you may want to figure out the date of the last day in that week. There is no ...

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 + 7?

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 ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu 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.