Counting Mondays in Date Range
Here is one way of doing it:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A29)),2)={2}))
A1 = the cell with the first date
A29 = the cell with the last date
Change to suit your needs...
Regards,
Ryan---
--
RyGuy
"nospaminlich" wrote:
I want to count the number of Mondays etc. in a date range. I found the
following on Chip Pearson's site...
=SUM(IF(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2,1,0))
Where A2 is the start date, B2 is the end and C2 is the weekday number
Whilst this does the trick I would prefer a solution which is not an array
formula. Can this be done another way e.g. with Sumproduct or similar and if
so how please?
Thanks a lot
Kewa
|