ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need a way to determine the # of Saturdays in a month (https://www.excelbanter.com/excel-worksheet-functions/149071-need-way-determine-saturdays-month.html)

Chuck M

Need a way to determine the # of Saturdays in a month
 
Hi all,
I need to determine the # of Saturdays in a given month. Can anyone help?
--
TIA
Chuck M.

Mike H

Need a way to determine the # of Saturdays in a month
 
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

"Chuck M" wrote:

Hi all,
I need to determine the # of Saturdays in a given month. Can anyone help?
--
TIA
Chuck M.


Chuck M

Need a way to determine the # of Saturdays in a month
 
Thats it! Thanks Mike.
--
Thanks.
Chuck M.


"Mike H" wrote:

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

"Chuck M" wrote:

Hi all,
I need to determine the # of Saturdays in a given month. Can anyone help?
--
TIA
Chuck M.


Don Guillett

Need a way to determine the # of Saturdays in a month
 
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))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Chuck M" wrote in message
...
Hi all,
I need to determine the # of Saturdays in a given month. Can anyone help?
--
TIA
Chuck M.



T. Valko

Need a way to determine the # of Saturdays in a month
 
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

--
Biff
Microsoft Excel MVP


"Chuck M" wrote in message
...
Hi all,
I need to determine the # of Saturdays in a given month. Can anyone help?
--
TIA
Chuck M.





All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com