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

Determining a Simple Moving Average

A moving average can be a great way to analyze a series of data points that you've collected over time. Setting up a ...

Discover More

Turning Off Sharing

All good things must come to an end at some point. When you are done sharing your workbook with others, this is how you ...

Discover More

Checking for Words and Phrases

You may want to determine if a document contains a certain set of words or phrases. There are a couple of ways you can ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

##### More ExcelTips (ribbon)

Returning Nothing If Two Values are Empty

Excel includes a large number of functions that can be used in evaluating the data in a worksheet. In this tip you learn ...

Discover More

Elapsed Days as Years, Months and Days

Need to know how many days there are between two dates? It's easy to figure out—unless you need the figure in ...

Discover More

Finding the Dates for Minimums and Maximums

If you use Excel to maintain a collection of data, you may need to find information in one column based on information in ...

Discover More
##### Subscribe

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

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 2 + 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 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.