Function NoSundays(FromDate As Date, ToDate As Date)
'NoSundays returns the number of workdays (excl Sun) between
''FromDate & 'ToDate' inclusive
FromDate = FromDate - 1
Do
FromDate = FromDate + 1
If WeekDay(FromDate) > 1 Then NoSundays = NoSundays + 1
Loop Until FromDate = ToDate
End Function
call it via:
NoSundays([FromDate],[ToDate])
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.