formula needed for counting months

S

Shocked

the formula that I ended up with seems to work was:
=sumproduct(--(month(a1:a100)=1,--year(a1:a100)=2004))

this formula did not count blanks for whatever reason.

Thanks agai
 
M

Max

Shocked said:
the formula that I ended up with seems to work was:
=sumproduct(--(month(a1:a100)=1,--year(a1:a100)=2004))

this formula did not count blanks for whatever reason.

Thanks for posting back

Think the saving grace was the 2nd condition in your:
=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2004))
which resolves to an array of zeros for blank cells
 
Top