# of thursdays in a specific month

aamir

Board Regular
Joined
Feb 17, 2010
Messages
116
how to count # of Thursdays in any month given in O2.

btw i found # of days in specific month(O2) by using this formula.
Code:
=DAY(DATE(YEAR(O2),MONTH(O2)+1,1)-1)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Upvote 0
Hello,

Here is the one way.

=SUMPRODUCT(--(WEEKDAY(ROW(INDEX(A:A,O2-DAY(O2)+1):INDEX(A:A,EOMONTH(O2,0))))=5))

If you are using 2003- this will require analysis ToolPak installed to work EOMONTH.
 
Upvote 0
Hope this will serve your purpose

Excel Workbook
ABCD
1StartEndThursdayNo of thursdays
21-Jan31-Jan54
31-Feb28-Feb54
41-Mar31-Mar55
51-Apr30-Apr54
61-May31-May54
71-Jun30-Jun55
81-Jul31-Jul54
91-Aug31-Aug54
101-Sep30-Sep55
111-Oct31-Oct54
121-Nov30-Nov54
131-Dec31-Dec55
Sheet1
 
Upvote 0
Hi

A variation on Haseeb's -

Code:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(EOMONTH($A$2,-1)+1&":"&EOMONTH($A$2,0))),2)=4))

where the date in A2 can be any date in the required month

NB with the same caveat about Excel 2003

hth
 
Upvote 0
If you have start date in A1 and end date in B1 this formula will give you a count of Mondays between those two dates (inclusive)

=INT((WEEKDAY(A1-5)+B1-A1)/7)

change the 2 to get other days (1=Sun through to 7 = Sat)

I appreciate the work by Mr. Peter and Mr. Gohar and the above formula also works for two days given in different cells. But my problem is that i only have one date and that's located on O2 and i have to find # of Thursdays in given month btw O2 date is always 1st of each month.
 
Upvote 0
.....i only have one date and that's located on O2 and i have to find # of Thursdays in given month btw O2 date is always 1st of each month.

Try this formula, I believe it will give you the same result as Haseeb's suggestion

=4+(DAY(O2+34)< WEEKDAY(O2+2))
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

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