View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
fernando cinquegrani[_2_] fernando cinquegrani[_2_] is offline
external usenet poster
 
Posts: 2
Default count wednesdays within a month


"sato" ha scritto nel messaggio
...
I want to count how many let's say wednesdays are within a calendar month
and
for each month of the year


in A1 start date, e.g.:
1/1/2010
in B1 end date, e.g:
=DATE(YEAR(A1),MONTH(A1)+1,0)
in C1 (general formula)
=INT((B1-x)/7)-INT((A1-x-1)/7)
where
x is 4 for wednesday (1 sunday, 2 monday, ...)
cfr.: http://www.prodomosua.eu/zips/delledate.xls
.f
--
fernando cinquegrani
http://www.prodomosua.eu