Business days

T

tglock19

I need to count 10 business days from a date given and output the date which
the 10th business day falls on
 
R

RuralGuy

I need to count 10 business days from a date given and output the date which
the 10th business day falls on

A function I use:

Public Function AdjWorkDays(dteStart As Date, _
intNumDays As Long, _
Optional blnAdd As Boolean = True) As Date
AdjWorkDays = dteStart
Do While intNumDays > 0
If blnAdd Then
'-- Adding WorkDays
AdjWorkDays = AdjWorkDays + 1
Else
'-- Subtracting WorkDays
AdjWorkDays = AdjWorkDays - 1
End If
If Weekday(AdjWorkDays, vbMonday) <= 5 Then
'-- Use the following code if you have a "Holiday" table
' If Weekday(dteCurrDate, vbMonday) <= 5 And
IsNull(DLookup("[Holiday]", "tblHolidays", "[HolDate] = #" &
dteCurrDate & "#")) Then
intNumDays = intNumDays - 1
End If
Loop
End Function

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 
Top