for each set of 7 days we have 5 working days

for the remainder, we must identify the days individually

i.e.

we start on a Thursday and datediff gives us 27 days

first integer divide and multiply by 5

workingdays= 27\7*5

then walk the remainder:

remainder = 27 mod 7

from today till today + remainder

if workingday then increment workingdays

Public Function GetNumberOfWorkDays(sStart

Dim iDays

Dim iWorkDays

Dim sDay

Dim i

iDays = DateDiff("d", sStartDate, sEndDate)

iWorkDays = (iDays \ 7) * 5

iDays = iDays mod 7

For i = 0 To iDays

'First day of the week is sunday

sDay = WeekDay(DateAdd("d", i, sStartDate))

If sDay <> 1 And sDay <> 7 Then

iWorkDays = iWorkDays + 1

End If

Next

GetNumberOfWorkDays = iWorkDays

End Function

Regards,

Sven