Count Function

A

Astro

I would like to use excel to count the number of cells containing year 2008.

23-Apr-07
15-May-08
21-Jan-08
05-Feb-07

Please advice on the function to do this.

Thank you.
 
B

Bob Phillips

=SUMPRODUCT(--(YEAR(A2:A20)=2008))

--
HTH

Bob

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

Gary''s Student

With data in A1 thru A100:
=COUNTIF(A1:A100,"<39814")-COUNTIF(A1:A100,"<39448")
 
Top