This article describes the formula syntax and how to use the WORKDAY.INTL function in Microsoft Excel.
This function returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. Optional Weekend parameters can indicate which and how many days are weekend days. Note that Weekend days and any days that are specified as holidays are not considered as workdays.
Syntax
WORKDAY.INTL(start_date, days, [weekend], [holidays])
The WORKDAY.INTL function syntax uses the following arguments:
-
start_date Required. The start date, truncated to integer.
-
days Required. The number of workdays before or after the start_date. A positive value yields a future date; a negative value yields a past date; a zero value yields the already specified start_date. Day-offset is truncated to an integer.
-
weekend Optional. If used, this indicates the days of the week that are weekend days and are not considered working days. The weekend argument is a weekend number or string that specifies when weekends occur.
The weekend number values indicate weekend days as shown below.
weekend number |
Weekend days |
---|---|
1 (or omitted) |
Saturday, Sunday |
2 |
Sunday, Monday |
3 |
Monday, Tuesday |
4 |
Tuesday, Wednesday |
5 |
Wednesday, Thursday |
6 |
Thursday, Friday |
7 |
Friday, Saturday |
11 |
Sunday only |
12 |
Monday only |
13 |
Tuesday only |
14 |
Wednesday only |
15 |
Thursday only |
16 |
Friday only |
17 |
Saturday only |
Weekend string values are seven characters long. Each character in the string represents a day of the week, starting with Monday. The character 1 represents a non-workday and 0 represents a workday. Only the characters 1 and 0 are permitted in the string. Also, 1111111 is an invalid string.
For example, 0000011 would result in a weekend that is Saturday and Sunday.
-
Holidays This is an optional argument at the end of the syntax. It specifies an optional set of one or more dates that are to be excluded from the working day calendar. Holidays shall be a range of cells that contain the dates -- or an array constant of the serial values that represent those dates. The ordering of dates or serial values in holidays can be arbitrary.
Remarks
-
If start_date is out of range for the current date base value, WORKDAY.INTL returns the #NUM! error value.
-
If any date in holidays is out of range for the current date base value, WORKDAY.INTL returns the #NUM! error value.
-
If start_date plus day-offset yields an invalid date, WORKDAY.INTL returns the #NUM! error value.
-
If a weekend string is of invalid length or contains invalid characters, WORKDAY.INTL returns the #VALUE! error value.
Example
Copy the following example data (the entire table including the header). In a new Excel worksheet, paste it into cell A1 and adjacent. If you do not automatically see results, select the formula, press F2 and press Enter. Adjust column widths if needed to see the everything.
Formula |
Description |
Live Result |
---|---|---|
=WORKDAY.INTL(DATE(2012,1,1),30,0) |
Using a 0 for the Weekend argument results in a #NUM! error. |
#NUM! |
=WORKDAY.INTL(DATE(2012,1,1),90,11) |
Finds the date 90 workdays from 1/1/2012, counting only Sundays as a weekend day (Weekend argument is 11). |
41013 |
=TEXT(WORKDAY.INTL(DATE(2012,1,1),30,17),"m/dd/yyyy") |
Uses the TEXT function to format the resulting serial number (40944) in a "m/dd/yyyy" format. Finds the date 30 workdays from 1/1/2012, counting only Saturdays as a weekend day (Weekend argument is 17). |
2/05/2012 |