ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I count cells with different criteria in excel? (https://www.excelbanter.com/excel-worksheet-functions/124900-how-do-i-count-cells-different-criteria-excel.html)

Richie17

How do I count cells with different criteria in excel?
 
I have a column with M or F (Male/Female) and I also have a column that has
their age. How do I count how many 6 year olds there are AND how many of
those are either male or female?

Dave F

How do I count cells with different criteria in excel?
 
You would need to use SUMPRODUCT.

Something like =SUMPRODUCT(--(A1:A100="M"),--(B1:B10=6))

Dave
--
Brevity is the soul of wit.


"Richie17" wrote:

I have a column with M or F (Male/Female) and I also have a column that has
their age. How do I count how many 6 year olds there are AND how many of
those are either male or female?


Richie17

How do I count cells with different criteria in excel?
 
Dave you are my new hero!...but now that you helped me with that does that
mean I have to get back to some real work? :(

My co-workers and myself appreciate what this can do for us now.
Thanks,
Richie17

"Dave F" wrote:

You would need to use SUMPRODUCT.

Something like =SUMPRODUCT(--(A1:A100="M"),--(B1:B10=6))

Dave
--
Brevity is the soul of wit.


"Richie17" wrote:

I have a column with M or F (Male/Female) and I also have a column that has
their age. How do I count how many 6 year olds there are AND how many of
those are either male or female?


Teethless mama

How do I count cells with different criteria in excel?
 
=SUM((A1:A100="M")*(B1:B100=6))

ctrl+shift+enter, not just enter


"Richie17" wrote:

I have a column with M or F (Male/Female) and I also have a column that has
their age. How do I count how many 6 year olds there are AND how many of
those are either male or female?


Richie17

How do I count cells with different criteria in excel?
 
Thanks Teethless Mama!

Your suggestion also works. I'm not sure why but hey why complain!

Thanks,
Richie17

"Teethless mama" wrote:

=SUM((A1:A100="M")*(B1:B100=6))

ctrl+shift+enter, not just enter


"Richie17" wrote:

I have a column with M or F (Male/Female) and I also have a column that has
their age. How do I count how many 6 year olds there are AND how many of
those are either male or female?


Bernard Liengme

How do I count cells with different criteria in excel?
 
Read here from details
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes (do I get a Hero medal?)
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Richie17" wrote in message
...
Dave you are my new hero!...but now that you helped me with that does that
mean I have to get back to some real work? :(

My co-workers and myself appreciate what this can do for us now.
Thanks,
Richie17

"Dave F" wrote:

You would need to use SUMPRODUCT.

Something like =SUMPRODUCT(--(A1:A100="M"),--(B1:B10=6))

Dave
--
Brevity is the soul of wit.


"Richie17" wrote:

I have a column with M or F (Male/Female) and I also have a column that
has
their age. How do I count how many 6 year olds there are AND how many
of
those are either male or female?





All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com