Function calcEndDateLong(startDate,numOfDays)
Dim numDaysToAdd
[COLOR=#008000]'add two days for each 5 business days[/color]
numDaysToAdd = numOfDays + numOfDays + (2 * Fix(numOfDays/5))
[COLOR=#008000]'add two more days if business day count will force an extra weekend[/color]
[COLOR=#008000]' Example: 4/9/13/etc business days on a friday causes an extra weekend[/color]
[COLOR=#008000]' Fri - 4, 3, 2, 1 causes extra weekend[/color]
[COLOR=#008000]' Thu - 3, 2, 1[/color]
[COLOR=#008000]' Wed - 2, 1[/color]
[COLOR=#008000]' Tue - 1[/color]
numDaysToAdd = numDaysToAdd + Fix((WeekDay(startDate) mod 7 + (numOfDays mod 5))/7) * 2
[COLOR=#008000]'add those days in[/color]
calcEndDate = DateAdd("d",numDaysToAdd,startDate)
[COLOR=#008000]'If saturday and number of days was evenly divisble by 5, subtract a day to remove extra weekend round off[/color]
[COLOR=#008000]'If saturday and number of days not evenly divisble by 5, add a day to fix round off[/color]
If WeekDay(startDate) = 7 Then calcEndDate = DateAdd("d",Fix((numOfDays mod 5 + 4)/5) * 2 - 1,calcEndDate)
[COLOR=#008000]'Same with sunday, except it is subtract 2 on evenly divisble and nothing on other amt's[/color]
If WeekDay(startDate) = 1 Then calcEndDate = DateAdd("d",Fix((numOfDays mod 5 + 4)/5) * 2 - 2,calcEndDate)
End Function