johnfrench
New member
- Joined
- Aug 14, 2007
- Messages
- 2
- Programming Experience
- 1-3
Hello all,
I want to be able to have a formula that calculates how many fridays in a given month, or how many monday, tuesday, wednesday, thursdays in a given month.
i know i can do something like this...
For eachdate = StartDate To EndDate
Select Case WeekDay(eachdate, vbMonday)
Case 5
GetFriCount = GetFriCount + 1
End Select
Next eachdate
but i wonder if there is a more elegant solution using the datetime functions...
any ideas anyone?
thanks!
I want to be able to have a formula that calculates how many fridays in a given month, or how many monday, tuesday, wednesday, thursdays in a given month.
i know i can do something like this...
For eachdate = StartDate To EndDate
Select Case WeekDay(eachdate, vbMonday)
Case 5
GetFriCount = GetFriCount + 1
End Select
Next eachdate
but i wonder if there is a more elegant solution using the datetime functions...
any ideas anyone?
thanks!