Determine number of rows meeting a condition

G

Guest

Within Office XP I need to count how many instances there are of a condition
being met...
For example, a column is assigned a categorizing code such as "A", "B", or
"C"... Is there a way to count the rows that have an "A" code assigned to
them? I'm looking for a solution specifying something like "25 rows meet the
"A" criterion".

Thank you...
 
B

Bernard Liengme

I will assume Office XP refers to Excel 2003
Let's assume the column is D
If you want to sum all the A's in the entire column use
=COUNTIF(D:D,"A")
If you need to check only part of the column (rows 1 to 100, for example)
=COUNTIF(D1:D100,"A")

To make a fancy answer use
=COUNTIF(D:D,"A")&" rows meet the 'A' condition"
If you are a double-quotes person
=COUNTIF(D:D,"A")&" rows meet the ""A"" condition"
where there are two double-quotes each side of A

best wishes
 
G

Guest

....My mistake, I'm using Excel 2002. Is there a method that you know of for
that version? Thanks again...
 
B

Bernard Liengme

Works will ALL versions - try it!
No one's PC exploded because they made typing error.
 

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