O
Onion
I'm not sure if NETWORKDAYS function can do this or not. I
have to account for a negotiated holiday of a half day.
I'm wondering if the following solution can be modified by
the experts to account for that 4 hours? OR, does
Networkdays have that ability when factoring in the last
component of my Holiday date range?
Function GetWorkDays(StartDate As Long, EndDate As Long)
As Long
' returns the count of days between StartDate - EndDate
minus Saturdays and Sundays
Dim d As Long, dCount As Long
For d = StartDate To EndDate
If Weekday(d, vbMonday) < 6 Then
dCount = dCount + 1
End If
Next d
GetWorkDays = dCount
End Function
TIA
have to account for a negotiated holiday of a half day.
I'm wondering if the following solution can be modified by
the experts to account for that 4 hours? OR, does
Networkdays have that ability when factoring in the last
component of my Holiday date range?
Function GetWorkDays(StartDate As Long, EndDate As Long)
As Long
' returns the count of days between StartDate - EndDate
minus Saturdays and Sundays
Dim d As Long, dCount As Long
For d = StartDate To EndDate
If Weekday(d, vbMonday) < 6 Then
dCount = dCount + 1
End If
Next d
GetWorkDays = dCount
End Function
TIA