View Single Post
  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default count no. of dates in a column that falls on certain month & year

Ron Rosenfeld wrote...
....
Then in F1 enter the formula:

=TEXT(E1,"""Month:""mmm ""Year:""yyyy"" = """)&
COUNTIF($D$1:$D$6,"="&E1)-COUNTIF($D$1:$D$6,
""&DATE(YEAR(E1),MONTH(E1)+1,0))

....

Could be shortened a bit.

=TEXT(E1,"""Month:""mmm ""Year:""yyyy = ")&
SUMPRODUCT(--(TEXT($D$1:$D$6,"yyyymm")=TEXT(E1,"yyyymm")))