Function WorkDays(StartDate As Long, EndDate As Long) As Long
Dim days As Long
Dim Counter As Long
For days = StartDate To EndDate
If Weekday(days, vbMonday) < 7 Then
Counter = Counter + 1
End If
Next days
WorkDays = Counter
End Function
fairwinds said:I'm not entirely happy with your formula![]()
E.g. Sunday 10/10-2004 + 6 days gives Sunday 17/10-2004
I would expect Saturday 16/10 as my formula gives.
Hopefully it could be adjusted as your suggestion is much more efficient.