Need a way to determine the # of Saturdays in a month

  • Thread starter Thread starter Guest
  • Start date Start date
Try this:-

=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=C1,1,0))

A1= Start date
B1 = End date
C1 = day of week you want 1=Sun - 7 = Sat
It's an array so Ctrl+Shift+enter

Mike
 
Thats it! Thanks Mike.
--
Thanks.
Chuck M.


Mike H said:
Try this:-

=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=C1,1,0))

A1= Start date
B1 = End date
C1 = day of week you want 1=Sun - 7 = Sat
It's an array so Ctrl+Shift+enter

Mike
 
try this where a1 contains any date in the month desired
=SUMPRODUCT(--(WEEKDAY(A1-1+ROW($A$1:INDEX(A:A,DAY(EOMONTH(A1,0)))))=7))
or start date in a1 and end date in a2
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(a1&":"&a2)))=7))
 
Another one:

A1 = any date in the month of interest

=4+(DAY(A1-DAY(A1)+35)<WEEKDAY(A1-DAY(A1)-DOW))

Where DOW = Monday = 1 to Sunday = 7
 
Back
Top