Counting Fridays in a month
Michael,
It's quite straight-forward, when broken down. It's theory is to get the day
of the last Friday in the month, and by taking the integer value of that day
plus 6 divided by 7, you get the number of Fridays.
First we get the first of the next month DATE(YEAR(A1),MONTH(A1)+1,1)
Then we get the day of the week of the first of nexyt month
WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,2)) based upon a Saturday week stgarts
Subtract the latter from the former to get the last Friday
Then add 6, divide b y 7 and take teh integer value
For Mondays, just use
=INT((DAY(DATE(YEAR(A1),MONTH(A1)+1,1)-WEEKDAY(DATE(YEAR(A1),MONTH(A1)+1,6))
) + 6 ) / 7 )
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Michael Singmin" wrote in message
...
Greetings Bob & Ron,
Bob, I am astounded by your fomula. Care to briefly explain the
thinking behind it. Also what if I want to count Mondays, what do I
change ?
Ron, I think there must be an error because your formula does not
even evaluate.
Many thanks,
Michael
================================================== =================
Michael Singmin wrote:
Hello group,
I have seen in clever past postings for "First Tuesday" and "Next
Monday" for the worksheeet.
Is there a one line worksheet formula that will deliver the number of
Fridays in a given month ?
One may assume certain givens eg. the day of the week of the 1st of
that month and/or the number of days in that month.
Thanks,
Michael Singmin
|