The code below is couresy of Bill Mosc, I have used it many times.
When you call the function specify the holidays or alternatley have a
separate table of holidays and loop hrough.
Function NetWorkDays(StartDate As Date, EndDate As Date, _
Optional Holiday1 As Date, Optional Holiday2 As Date) As Long
'Purpose: Determine the number of workdays between 2 dates.
' Note: be sure to use weekdays for both start and end dates.
Dim lngDays As Long
If StartDate = EndDate Then
NetWorkDays = 0
GoTo exit_NetWorkDays
End If
lngDays = EndDate - StartDate + 1 - Int((EndDate - StartDate + 1)
/ 7) * 2 - _
IIf(Int((EndDate - StartDate + 1) / 7) = (EndDate - _
StartDate + 1) / 7, 0, IIf(Weekday(EndDate) <
Weekday(StartDate), 2, 0)) - _
IIf(Weekday(StartDate) = 1 Or Weekday(EndDate) = 7, 1, 0)
If IsMissing(Holiday1) = False Then
If Holiday1 <> vbSaturday And Holiday1 <> vbSunday Then
lngDays = lngDays - 1
End If
End If
NetWorkDays = lngDays
Debug.Print NetWorkDays
exit_NetWorkDays:
Exit Function
End Function