View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Counting number of Sundays


{=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(A2-A1)+1)))=1,1,0))}

Do not type the outter brackets { } . This is an array formula committed by
Ctrl+Shift+Enter.

HTH,
Paul

--

"Excelman" wrote in message
...
I am looking for a formula that will count the number of Sundays within a
date range. Example: I want to enter a start date in one cell, and today's
date in another,and need a formula that will count the number of Sundays
between the two.A1 3/01/2008
A2 3/31/2008
A3 5 (5 Sundays between the dates)