Find the Months that have 5 Fridays in them

Stephen_IV

Well-known Member
Joined
Mar 17, 2003
Messages
1,180
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I would like to be able to put the year in A1 and have in column B the months that have 5 Fridays in them. For instance if I put 2010 in A1, I would like in Column B January, April, July,October, December to appear. Any help would be appreciated if I put 2005 in A1 then I would like April, July, September, December. Thanks in advance Stephen.
 
You can probably simplify this somewhere but try this formula in B1

=IF(ROWS(B$1:B1)>4+(WEEKDAY(DATE(A$1,1,2))>6-(DAY(DATE(A$1,2,29))=29)),"",TEXT(SMALL(IF(DAY(DATE(A$1,ROW(INDIRECT("1:12")),35))< WEEKDAY(DATE(A$1,ROW(INDIRECT("1:12")),-5)),ROW(INDIRECT("1:12"))),ROWS(B$1:B1))*29,"mmmm"))
<?XML:NAMESPACE PREFIX = WEEKDAY(DATE(A$1,ROW(INDIRECT("1 /><WEEKDAY(DATE(A$1,ROW(INDIRECT("1:12")),-5)),ROW(INDIRECT("1:12"))),ROWS(B$1:B1))*29,"mmmm"))< p>
confirmed with CTRL+SHIFT+ENTER and copied down to B5
</WEEKDAY(DATE(A$1,ROW(INDIRECT("1:12")),-5)),ROW(INDIRECT("1:12"))),ROWS(B$1:B1))*29,"mmmm"))<>
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
jonmo1 thanks for your formula, barry houdini it works perfectly thank you so much. I appreciate all of posts. Thanks again.
 
Upvote 0
you can't go wrong with Barry's work!!!! :cool:

and for the rest of you - you must not be busy. LOL but great work
 
Upvote 0

Forum statistics

Threads
1,225,203
Messages
6,183,555
Members
453,168
Latest member
Luggsy

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