COUNT function 2 Columns

J

JAMES

I have two columns of data, CATEGORY and NUMBER, and want
to be able to COUNT the number instances where CATEGORY =
X and NUMBER = Y.

I know how to use the COUNT function on each column, but
I don't know how to use it on two columns.

Thanks!
 
P

Paul B

James, how about something like this
=SUMPRODUCT((A2:A25="test")*(B2:B25=24))

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
R

Ragdyer

Say "Category" is column A, and "Number" is column B.

=SUMPRODUCT((A2:A100="X")*(B2:B100="Y"))
 
J

JAMES

Sorry, I should have said that both columns contain TEXT -
any ideas?

eg. two columns CATEGORY (A, B, C) and SIZE (small, med,
large). I want to count how many of a certain category
AND a certain size.
 
Top