View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove[_5_] Harlan Grove[_5_] is offline
external usenet poster
 
Posts: 97
Default Counting Fridays in a month

"Bob Phillips" wrote...
Assuming a date in A1,

=INT((DAY(DATE(YEAR(A1),MONTH(A1)+1,1)
-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,2)))+6)/7)

...

Too long. Try

=4+(MOD(WEEKDAY(A1-DAY(A1),3)-WDN,7)-DAY(A1-DAY(A1)+32)2)

where WDN is the weekday number for 0=Monday, ..., 6=Sunday.

--
To top-post is human, to bottom-post and snip is sublime.