Friday, November 19, 2021

Workday intl function

This article describes the formula syntax and usage of the WORKDAY.INTL function in Microsoft Excel.

Returns the serial number of the date before or after a specified number of workdays with custom weekend parameters. Weekend parameters indicate which and how many days are weekend days. 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 has 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 start_date. Day-offset is truncated to an integer.

  • Weekend    Optional. Indicates the days of the week that are weekend days and are not considered working days. Weekend is a weekend number or string that specifies when weekends occur.

    Weekend number values indicate the following weekend days:

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 and each character in the string represents a day of the week, starting with Monday. 1 represents a non-workday and 0 represents a workday. Only the characters 1 and 0 are permitted in the string. 1111111 is an invalid string.

For example, 0000011would result in a weekend that is Saturday and Sunday.

  • Holidays    Optional. 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 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.

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

1 comment: