How many fridays in any given month?

logique

New Member
Joined
Jun 6, 2002
Messages
4
How can I get the number of Fridays in any given month starting from any given date?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hello and welcome to the board :)

This formula appears to work. It assumes that the start date is in cell A2. In order to use this the Analysis Toolpak must be installed. You can do this by clicking Tools, Add-ins and then checking the Analysis Toolpak addin.

<font color="#000080" face="Arial Alternative" size="1">=IF(WEEKDAY(A2)=6,INT((EOMONTH(A2,0)-A2)/7)+1,INT((EOMONTH(A2,0)-A2)/7))</font>[/i]

HTH,
Dan
 
Upvote 0
Thank You guys for your help. But neither formular works for the whole year.

Pablo's formula works for the whole year except for the month of June.

DK's formula works on June but is off on other months.

I need to find how many fridays in each month no mather what the given date is for that month.
 
Upvote 0
There must surely be a simpler formula but this seems to work :-

=1+INT((EOMONTH(A2,0)-(DATE(YEAR(A2),MONTH(A2),1)+MOD(6-WEEKDAY(DATE(YEAR(A2),MONTH(A2),1)),7)))/7)



EDIT : This is a bit shorter :-

=1+INT((EOMONTH(A2,0)-(EOMONTH(A2,-1)+1+MOD(6-WEEKDAY(EOMONTH(A2,-1)+1),7)))/7)
This message was edited by Tikas A. Planck on 2002-06-08 08:13
This message was edited by Tikas A. Planck on 2002-06-08 15:12
This message was edited by Tikas A. Planck on 2002-06-08 15:13
 
Upvote 0
On 2002-06-08 06:21, logique wrote:
Thank You guys for your help. But neither formular works for the whole year.

Pablo's formula works for the whole year except for the month of June.

DK's formula works on June but is off on other months.

I need to find how many fridays in each month no mather what the given date is for that month.

=SUMPRODUCT((WEEKDAY(DATE(YEAR(A2),MONTH(A2),ROW(INDIRECT("1:"&DAY(DATE(YEAR(A2),MONTH(A2)+1,0))))))=6)+0)

where A2 houses a date and 6 is the serial number that refers to Friday.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top