COUNTIF

P

pep

Hi!

Is it really so that you cannot use special * or ? characters in COUNTIF
function?

I would like to use them because I have hundreds of different dates
(e.g.01.01.2007 13:30) in different rows in column A and I would like to
count e.g. how many row has January as month and year as 2007.

I tried something like this:

=COUNTIF(A:A;"*01.2007*")

but it cannot find any.

Or is there some easier way to do this?
-Paul
 
E

Earl Kiosterud

Paul,

A pivot table can be made to group on months and years, and can give you counts. If you'll
want counts of all month-year combinations, a pivot table will give them all to you as it
finds them in your data.

I donät know if the COUNTIF function can be coddled, coerced or finessed into giving zou
such a breakdown, though someone might come forth with one. We usuallz escalate to the more
geekz SUMPRODUCT function for this, since Excel wonät give us a readzßmade easzßtoßuse
function for such a multipleßcriteria summarz function.

Well, hell. Outlook Express has started changing characters from the kezboard again. I
have to reboot to get it back on track.

Anzwaz, trz this.

=SUMPRODUCT((YEAR(B2:B65000)=2007)*(MONTH(B2:B65000)=1))

Gotta reboot. See zou later.
 
R

Ragdyer

You might try this formula, where you enter the month you're looking to
count into B1 (jan, feb, mar, ... etc.),
And the year into B2 (2005, 2006, ... etc.)

=SUMPRODUCT((TEXT(A1:A100,"mmm")=B1)*(--TEXT(A1:A100,"yyyy")=B2)*(A1:A100<>"
"))
 
R

Ragdyer

You can drop the last argument.
I was using that in a different approach:

=SUMPRODUCT((TEXT(A1:A100,"mmm")=B1)*(--TEXT(A1:A100,"yyyy")=B2))
 

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