Weekdays of the month

Y

yanf7

Hi,
Can someone help me?
I am looking for a way to get how many certain weekdays are in a
specific month.

For example, how many thursdays are in august.



------------------------------------------------




------------------------------------------------
 
P

Peo Sjoblom

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)=MATCH(B1,{"Monday";"Tuesd
ay";"Wednesday";"Thursday";"Friday";"Saturday";"Sunday"},0)))

where A1 holds the first date of the month and A2 the last date and B1 holds
the day you want to check
So if you type Thursday in B1, 08/01/03 in A1 and 8/31/03 in A2 it will
return 4

If Monday is 1 and Sunday is 7 you can use

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)),2)=4))

or replacing 4 with a cell reference where you put the number
 
D

Daniel.M

Hi,

Your year in A1
Your month in A2
Your day in A3 (1=Sunday, 2=Monday,..., 7 =Saturday)

Number of A3 in month A2 of year A1:

=4+(DAY(DATE(A1,A2,35))<WEEKDAY(DATE(A1,A2,8-A3)))

Regards,

Daniel M.
 
Top