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

Finding the Previous Work Day

by Allen Wyatt
(last updated December 12, 2018)


Joe wonders how to return the date of the previous work day, taking into account any holidays. He needs to be able to get this information for any particular date.

Excel has a number of functions and formulas that help automate obtaining routine information. The Analysis ToolPak add-on contains formulas that can help with these automations. One is the WORKDAY function.

Assuming you have the Analysis ToolPak enabled (how you do so has been covered in other issues of ExcelTips), you can obtain the date information you need by using the following formula:


The first part of this formula, 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:


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.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8104) 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: 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. ...


Formatting Captions

When you add captions to elements in your document, Word allows you to modify how those captions are formatted. Here's ...

Discover More

Controlling Display of the Formula Bar

The Formula Bar is a regularly used feature in the Excel interface. You can, however, modify whether Excel displays the ...

Discover More

Moving the House Number to Its Own Cell

Excel is great at manipulating data, but sometimes it is difficult to figure out the best way to do the manipulation. ...

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 (menu)

Converting an Unsupported Date Format

Excel makes it easy to import information created in other programs. Converting the imported data into something you can ...

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

Leap Years and Fiscal Periods

Need to figure out when a fiscal year ends when that period does not correspond to the calendar year? Here are some ways ...

Discover More

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

View most recent newsletter.


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}] 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 more than 2?

2017-10-16 12:16:12


Thank you!!!!!

2017-04-21 17:40:23


Stan, I'd like the answer to that as well. I'm trying to get a date 30 days from the end of the month, but if that falls on a weekend or a holiday, I need the last work day prior. I almost have it, but Thanksgiving of 2013 is giving me issues. Thirty days out from October 31st is Saturday, November 30th.

If I put the calculations into separate columns, I can get the correct result, but I can't quite put all the coding from the different columns into one cell:

• Column A: EOM , Date in row 2 of 12,31,2012. Rest of cells in column have =EOMONTH(A2,1)
• Column B: =$A2+30
• Column C: =B2 + (COUNTIF(I$2:I$14,B2)*-1)
• Column D: =C2+CHOOSE(WEEKDAY(C2),-2,0,0,0,0,0,-1)
• Column E: =D2 + (COUNTIF(I$2:I$14,D2)*-1)
• Column F: =E2 + (COUNTIF(I$2:I$14,E2)*-1)
• Column G is simply shaded to break from the list of Holidays and the Holiday Calculation
• Column H is simply text name of Holiday (e.g. New Year Day)
• Column I is Holiday Calculation:
• =DATE(2013,1,1)
• 1/30/2013 (This was changed from =DATE(YEAR(TODAY()),1,1)+14+CHOOSE(WEEKDAY(DATE(YEAR(TODAY()),1,1)),1,0,6,5,4,3,2)
just for testing purposes)
• etc. In 2013, Thanksgiving falls on November 28th, and the Friday after falls on the 29th.

If somone can help me get the code from the different columns (A-F) into one cell, it would be greatly appreciated. Before I thought of Thanksgiving falling at the end of the month, I had:
=((A12+30) + (COUNTIF(E12:E24,(A12+30))*-1))+CHOOSE(WEEKDAY(((A12+30) + (COUNTIF(E12:E24,(A12+30))*-1))),-2,0,0,0,0,0,-1)
but I've had to add two more checks for holidays.

Thank you

2015-05-18 11:18:14


@stan try this:


I use a slightly modified one that moves the day to Monday if the day in question falls on a Sunday.


2015-01-28 16:50:48


Stan wanted the previous workday , only if the current day is a weekend or holdiday. the above solution doesn't give the same day as requitred for mon to fri.

this should work

workday(current date +1, -1, myholidays)

2014-04-08 12:02:10

Stan Lieberman

Micky - 0) Thank you for responding
1) Weenend days are Saturday and Sunday
2) Holiday dates are in a worksheet named "Holidays" in the same workbook where I want to create the formula.
3) If the date in cell A1 is not a weekend or holiday I want the result to be the same date that is already in cell A1. (As further explanation, I have a rule that says, "If the due date is on a weekend or holiday the due date changes to the last workday before the original due date").
Thank you for your help.
Stan - Los Angeles, CA - USA

2014-04-08 07:01:20

Michael (Micky) Avidan

@Stan,1) What R the Weekend day(s) in your region ?
2) where did U put the Holiday(s) date(s) ?
3) If the date, in cell A1, is not a weekend - what do you expect as a result ?
Michael (Micky) Avidan
“Microsoft® Answers" - Wiki author & Forums Moderator
“Microsoft®” MVP – Excel (2009-2014)

2014-04-07 13:01:35

Stan Lieberman

I'm looking for a formula that will give me the previous workday ONLY IF THE DATE (in cell A1) FALLS ON A WEEKEND OR HOLIDAY (HOLIDAY AS DEFINED BY ME). Is there a way to do this?
Thank you.

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

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.