How can I count the number of SATURDAYS in a month?

S

Simon

So many posts on excluding weekends via the NETWORKDAYS and WEEKDAY
functions, but how can I get the amount of Saturdays?

Thanks:)
 
P

Pete_UK

Perhaps you didn't search with the right criteria. Here's a solution
posted by Biff in June 2008:

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

Where DOW = Mon - 1 thru Sun - 7

It assumes A1 contains any date within the month you are interested
in, and if you are looking for Saturdays then you would need:

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

Hope this helps.

Pete
 
Z

zxcv

So many posts on excluding weekends via the NETWORKDAYS and WEEKDAY
functions, but how can I get the amount of Saturdays?

Thanks:)

If your start date is in A1 and end date is in B1 the following will
calculate the number of Saturdays in this range:

=IF((7)<WEEKDAY(A1),CEILING(MAX((WEEKDAY(A1)+(B1-A1)-(7)-6)/7,0),
1),CEILING(MAX((WEEKDAY(A1)+(B1-A1)-(7)+1)/7,0),1))

To check other days change the (7)'s to the corresponding day of the
week (Sun-Fri :: (1)-(6))
 

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