Rediger

Del via


WorksheetFunction.WorkDay_Intl method (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

expression.WorkDay_Intl (Arg1, Arg2, Arg3, Arg4)

expression A variable that represents a WorksheetFunction object.

Parameters

Name Required/Optional Data type Description
Arg1 Required Variant Start_date - The start date, truncated to integer.
Arg2 Required Variant Days - 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 0 (zero) value yields the start_date. Day-offset is truncated to an integer.
Arg3 Optional Variant Weekend - 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 numberWeekend days
1 or omittedSaturday, Sunday
2Sunday, Monday
3Monday, Tuesday
4Tuesday, Wednesday
5Wednesday, Thursday
6Thursday, Friday
7Friday, Saturday
11Sunday only
12Monday only
13Tuesday only
14Wednesday only
15Thursday only
16Friday only
17Saturday only
Arg4 Optional Variant Holidays - An optional set of one or more dates that are to be excluded from the working day calendar. Holidays is 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.

Return value

Double

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.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.