SpreadJS Documentation
WORKDAY.INTL

This function returns the serial number of the date before or after a specified number of workdays with custom weekend parameters.

Syntax

WORKDAY.INTL(startdate,numdays,weekend,holidays)

Arguments

This function has these arguments:

Argument Description
startdate Date that is the starting date; a number (as in 37806.5), or a DateTime object, as in DATE(2003,7,4)
numdays Number of workdays before or after the starting date; days in the future are positive and days in the past are negative; if not an integer, the number is truncated
weekend [Optional] A number or string that specifies when weekends occur. Weekend days are days of the week that are not counted as working days
holidays [Optional] Range of dates to exclude from the calculation; if omitted, the calculation assumes no holidays and all weekdays are workdays

The following table lists the weekend number values:

Number Day
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

Remarks

Weekend string values are seven characters long and each character in the string represents a day of the week, starting with Monday. A non-workday is 1 and a workday is 0. Only characters 1 and 0 are allowed in the string. The string 1111111 always returns 0.

Weekend days and holidays are not considered to be workdays.

Data Types

Accepts numeric, string, or DateTime object data. Returns numeric data.

Examples

WORKDAY.INTL(A2,A4)

WORKDAY.INTL(R2C1,R5C5)

WORKDAY.INTL(A1,A2,A5:A7)

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.