CountIf formula question

M

Marilyn

I have a spreadsheet in Excel 2003 and Column A has dates in the following
formats: 1/1/2007. I'm trying to create a Formula that counts how many
cells have January on them, so I created something like this:
Countif(A1:15), 1/2007, but is not working because it returns 0. is there a
way to Count the number of cells with January on them?

Thanks,
 
B

Bob Phillips

=SUMPRODUCT(--(A1:A15<>""),--(MONTH(A1:A15)=1))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Top