View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nospaminlich nospaminlich is offline
external usenet poster
 
Posts: 68
Default Counting Mondays in Date Range

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