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: Finding the Previous Work Day.

Finding the Previous Work Day

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


2

Joe wonders how to return the date of the previous workday, taking into account any holidays. He needs to be able to get this information on any particular date. This is rather easy; in fact, Excel has a function designed specifically for this purpose:

=WORKDAY(A1,-1,MyHolidays)

The WORKDAY function is used to determine dates for workdays, based upon adjustments that you specify. The first argument, A1, refers to the cell where the reference date is located. This information can be obtained in a couple of different ways. You can manually enter the date into cell A1 or you could use a formula in that cell to signify the date. For instance, you could use the following simple formula in cell A1 so that it always contains today's date:

=TODAY()

The second part of the formula, -1, says to subtract one day from the date in A1. The third part of the formula, MyHolidays, refers to a named range containing a list of dates and holidays you want skipped in determining the previous workday.

The WORKDAY function returns the date of day previous to the date entered in A1, allowing for any holidays.

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 use the WORKDAY.INTL function, which was introduced in Excel 2010. It works much the same as the WORKDAY function, except it added a new parameter that is specified in the third position.

For instance, let's say that you run a barber shop and you are closed on Sunday and Monday. (These are your non-workdays.) In that case, you could calculate the previous workday, with holidays, by using the following:

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

Note the addition of the third parameter. This is a value indicating 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 (8106) 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: Finding the Previous Work 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

Resetting Word Menus

Word allows you to customize the program's menus as much as you want. At some point, however, you may want the menus to ...

Discover More

Using Document Properties to Ensure Consistent References

If you need to refer to the same information over and over in a document, you may be interested in using custom document ...

Discover More

Inserting Worksheet Values with a Macro

Macros are often used to process information in a worksheet. You may need your macro to change the values stored in ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Parsing Non-Standard Date Formats

When you load data into Excel that was created in other programs, the formatting used for some types of data (such as ...

Discover More

Using a Text Function with a Date/Time Returns an Error

If you use a text function with a date or time, you'll get an error. To understand why this occurs (and how to get around ...

Discover More

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
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 six minus 4?

2024-03-31 23:33:58

Fred Potter

Hello Simon,
I think that the "Weekend string" is a series of 0’s and 1’s that represent seven days of the week, beginning with Monday. 1 represents a non-working day and 0 represents a workday. Your example would be:

“1000111” – Fri, Sat, Sun & Monday are "weekends" or non-working days..


2024-03-31 05:39:01

Simon Freeman

Suppose you only work Tuesday (13), Wednesday (14) and Thursday (15). Can you use =WORKDAY.INTL(A1,-1,13 14 15,MyHolidays)?


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.