Using COUNTIF to find how many times 2004 occurs

G

Guest

I'm using a COUNTIF to find how many times the year 2004 occurs in a column.
I've tried the function several different ways, and always come up with zero.

=COUNTIF(F2:F463,"=2004")
=COUNTIF(F2:F463,"=*2004")

Help!!
 
C

Chip Pearson

Its even simpler than you think:

=COUNTIF(F2:F463,2004)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
D

Dave Peterson

What's in F2:F463?

I put 2004 in a few cells and your first formula worked fine.

If you really have dates, then you could use:

=sumproduct(--(year(f2:f463)=2004))
to get the count.
 
G

Guest

Hi,

From your formulas, i understand that you want to count those rows in range
F2:F463, where 2004 appears either as a standalone entry or as part of any
other text.. Try this array formula (Ctrl+Shift+Enter) in cell F465

=sum(IF(ISNUMBER(FIND(E465,$F$2:$F$463)),1,0))

Cell E465 contains the text "2004" (w/o the quotes)

Regards,

Ashish Mathur
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top