This article describes the formula syntax and usage of the WORKDAY function in Microsoft Excel.
Description
Returns a number that represents a date that is the indicated number of working days before or after a date (the starting date). Working days exclude weekends and any dates identified as holidays. Use WORKDAY to exclude weekends or holidays when you calculate invoice due dates, expected delivery times, or the number of days of work performed.
Tip: To calculate the serial number of the date before or after a specified number of workdays by using parameters to indicate which and how many days are weekend days, use the WORKDAY.INTL function.
Syntax
WORKDAY(start_date, days, [holidays])
The WORKDAY function syntax has the following arguments:
- Start_date Required. A date that represents the start date.
- Days Required. The number of nonweekend and nonholiday days before or after start_date. A positive value for days yields a future date; a negative value yields a past date.
- Holidays Optional. An optional list of one or more dates to exclude from the working calendar, such as state and federal holidays and floating holidays. The list can be either a range of cells that contain the dates or an array constant of the serial numbers that represent the dates.
Important: Dates should be entered by using the DATE function, or as results of other formulas or functions. For example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as text.
Remarks
- Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default, January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days after January 1, 1900.
- If any argument is not a valid date, WORKDAY returns the #VALUE! error value.
- If start_date plus days yields an invalid date, WORKDAY returns the #NUM! error value.
- If days is not an integer, it is truncated.
Example
Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.
Data | ||
10/1/2008 | Start date | |
151 | Days to completion | |
11/26/2008 | Holiday | |
12/4/2008 | Holiday | |
1/21/2009 | Holiday | |
Formula | Description (Result) | Result |
=WORKDAY(A2,A3) | Date 151 workdays from the start date (4/30/2009) | 4/30/2009 |
=WORKDAY(A2,A3,A4:A6) | Date 151 workdays from the start date, excluding holidays (5/5/2009) | 5/5/2009 |