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)
Gary''s Student - 26 Mar 2008 22:35 GMT
If the two dates are:
Sunday, March 23, 2008
Sunday, March 30, 2008
does that count as two Sundays, one Sunday, or no Sundays??

Signature
Gary''s Student - gsnu200775
> 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)
Mike H - 26 Mar 2008 22:44 GMT
good point
> If the two dates are:
>
[quoted text clipped - 9 lines]
> > A2 3/31/2008
> > A3 5 (5 Sundays between the dates)
PCLIVE - 26 Mar 2008 22:37 GMT
{=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
>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)
Mike H - 26 Mar 2008 22:40 GMT
Hi,
Srat date in a1
End date in b1
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=1,1,0))
Just for interest the =1 bit looks for Sundays 2 would be mondays etc
Mike
> 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)
Ron Coderre - 26 Mar 2008 22:45 GMT
With
A1: (the start date)
A2: (the end date)
This formula counts the number of Sundays within that range
=SUM(INT((WEEKDAY(A1-1)+A2-A1)/7))
Note: To count different weekdays, replace 1 with
one of these values: 1=Sun, 2=Mon.....7=Sat
Does that help?
Post back if you have more questions.
--------------------------
Regards,
Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
>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)
Jim Thomlinson - 26 Mar 2008 23:56 GMT
Check out this link... it has a pile of great date formulas...
http://www.cpearson.com/excel/DateTimeWS.htm

Signature
HTH...
Jim Thomlinson
> 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)
Ron Rosenfeld - 27 Mar 2008 01:24 GMT
>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)
=INT((A2-WEEKDAY(A2)-A1+8)/7)
--ron