WorksheetFunction.WorkDay_Intl Method

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.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Function WorkDay_Intl ( _
    Arg1 As Object, _
    Arg2 As Object, _
    Arg3 As Object, _
    Arg4 As Object _
) As Double
'Usage
Dim instance As WorksheetFunction
Dim Arg1 As Object
Dim Arg2 As Object
Dim Arg3 As Object
Dim Arg4 As Object
Dim returnValue As Double

returnValue = instance.WorkDay_Intl(Arg1, _
    Arg2, Arg3, Arg4)
double WorkDay_Intl(
    Object Arg1,
    Object Arg2,
    Object Arg3,
    Object Arg4
)

Parameters

  • Arg1
    Type: System.Object

    Start_date - The start date, truncated to integer.

  • Arg2
    Type: System.Object

    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
    Type: System.Object

    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.

  • Arg4
    Type: System.Object

    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

Type: System.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.

See Also

Reference

WorksheetFunction Interface

WorksheetFunction Members

Microsoft.Office.Interop.Excel Namespace