C1: =SUMPRODUCT(--(WEEKDAY(A1-1+ROW($A$1:INDEX(A:A,DAY(EOMONTH(A1,0)))))=B1))
That formula returns the count of days of the type referenced in B1 there
are in the month including the value in A1.
Example:
A1: 2/1/2006
B1: 2 (Monday)
C1: returns 4
Is that what you're looking for?
***********
Regards,
Ron
XL2002, WinXP-Pro
With some date in the month in A1:
=4+(DAY(A1-DAY(A1)+1-WEEKDAY(A1-DAY(A1+5))+35)>7)
will give the number of Fridays in a month.
For a different weekday, change the '5' near the end accordingly:
1:Monday 7:Sunday
--ron