How to calculate the number of fridays in a month in microsoft office excel? Adding the current date, finding number of days/months/years between two dates is simple but if i input a cell as the current month and current year, i want to know the number of fridays in that particular month. The output is shown in another cell in number format form. how can i do that? by adding c codes or VB codes in excel? thanks..

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with premium.
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial=WENN(MONAT(A1+(6-WOCHENTA

in english, it might be

=IF(MONTH(A1+(6-WEEKDAY(A1

where A1 contains the date to count fridays for. It seems to me that there must be a simpler solution.

put The month and year (Nov-03) in A1 now paste the formula below to any cell it calculates no of fridays in the specified month. its a array formula so after pasting instead of hitting enter key, hit shift+ctrl+enter (in doing so excel will automatically put curly braces at the beginning and end of the foumula). In the end of the formula "=6)*1" the 6 specifies the day to look for (sunay=1, monday=2...)

=SUM((WEEKDAY(DATE(YEAR(A1

Sub tDate()

Range("A15").FormulaArray = _

"=SUM((WEEKDAY(DATE(YEAR(A

End Sub

or english perhaps

=ROUNDDOWN((DATE(YEAR(A1);

is already a bit shorter.

DATE(YEAR(A1);MONTH(A1)+1;

A1+(6-WEEKDAY(A1)+IF(WEEKD

The difference between them divided by 7 plus the first friday is the number of fridays in the month.

Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get every solution instantly with premium.
Start your 7-day free trial.

If cell A1 has the first day of the month, then create the last day of the month in B1 with the formula "=EOMONTH(A1,0)". You can find the first Friday of the month using the WEEKDAY and MOD functions. In C1, put in the formula "=WEEKDAY(A1,2)". This will result in a 1 if it is Monday, 2 if it is Tuesday, etc.., and 5 if it is a Friday. In D1, put in the formula "=MOD(C1,5)", which will tell you how many days from Friday the first day of the month is. Now you can add 7 days to the first day of the month and subtract D1 to get the first Friday of the month (take care of the special case where the first day of the month is Friday). Combining it all into one formula in cell E1, "=A1+IF(WEEKDAY(A1,2)=5,0,