Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: counting the number of cells that satisfy multiple criteria

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
US
I have one column "sex" with values "male" or "female", and another column "age" with values "adult" and "child". I'd like to count the number of adult males using a function. I can count the number of males, or the number of adults, using COUNTIF, but it doesn't look like I can specify multiple criteria.

Liam Morley
lmorley@wpi.edu
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence."
 
nope - you can't

Have a look at the SUMPRODUCT function. If the search functionality is working, there should be approximately a billion (maybe a slight exaggeration) examples in this forum

Rgds, Geoff

Yesterday it worked. Today it is not working. Windows is like that.

Please read FAQ222-2244 before you ask a question
 
Or you could add new colums for each outcome you want.
i.e. Adult Male =(if "a1" ="adult",1,0)
then fill this down
(where column A is your Adult/Child data)
Then sum this et voila this is the sum of adult males!

Regards, Phil.
C.E.O. Bodgeit, Leggit & Scarper. International.
"Stuffing things up completely since 1973"
 
Take a look at faq68-4725



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Top notch Blue - didn't realise you had written that

I will point peeps to that from now on

Rgds, Geoff

Yesterday it worked. Today it is not working. Windows is like that.

Please read FAQ222-2244 before you ask a question
 
thanks blue! i gave the faq a high grade. <p>Liam Morley<br><A HREF="mailto:"></A><br>&quot;light the deep, and bring silence to the world.<br>light the world, and bring depth to the silence.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top