How do I calculate number of Mondays in a given month in Excel?

G

Guest

I'm trying to get Excel to calculate the number of Mondays, Tuesdays, etc in
a given month but I haven't found a function that addresses this task. Any
ideas?
 
B

Bob Phillips

=4+(DAY(A1-DAY(A1)+35)<WEEKDAY(A1-DAY(A1)-DoW))

where DoW is the day number to test, 1 Sun, 2 Mon

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)
 
S

SteveG

You could use this with a helper column,

=SUMPRODUCT(--(WEEKDAY(DATE(2006,1,K1:K31),1)=2))

Where K1:K31 contains the numbers 1 - 31 and "=2" is the day of the
week you are looking for (1=Sun, 2=Mon...)

If you don't want to use a helper column just type out the numbers in
the formula where the K1:K31 range is like {1,2,3,4,,,,,,31}.

HTH

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top