Quantity of specific days within a time period.

  • Thread starter Thread starter Gary jones
  • Start date Start date
G

Gary jones

Can Excel determine for me how many Mondays, Tuesdays, etc. fall
within a time period?
Example: How many Thursdays, and Saturdays fall between 8/10/03 and
11/15/03?
 
With 8/10/03 in A1 and 11/15/03 in A2

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

or hard coded

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(--"08/10/03"&":"&--"11/15/03")),2)={4,6}
))
 
Hi Gary,

A1: Initial date (10 Aug in yr ex)
A2: Final date (15 Nov)
DOW: (Sundays =1, Mondays=2, ..., Saturdays = 7)

=INT((A2-WEEKDAY(A2+1-DOW)-A1+8)/7)

So the number of Tuesdays is given by:
=INT((A2-WEEKDAY(A2-2)-A1+8)/7)

Got it?

Daniel M.
 
Back
Top