ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count function (https://www.excelbanter.com/excel-worksheet-functions/221046-count-function.html)

Jerry Edge

Count function
 
I have a spredsheet with 10 codes and a database with a list of data with
three columns one is headed code, (same as the 10 codes), one headed Race and
one headed Gender. I am truing to count by race and by gender and by code.
For example, I am trying to count all of the Hispanics that are also males
that fit into clde 2.

--
Jerry Edge

Shane Devenshire[_2_]

Count function
 
Hi,

Your discription suggest that the quickest and most elegent solution might
be a pivot table.

If you want a non-pivot table solution in 2007 you could consider
=COUNTIFS(Race,"Hispanics",Gender,"Male")
is an example, where Race is the column containing race and Gender is the
range containing the gender. You can expand this to handle three criteria at
the same time if necessary.

In 2003 you will need something like
=SUMPROODUCT((Race="Hispancis")*(Gender="Female"))

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Jerry Edge" wrote:

I have a spredsheet with 10 codes and a database with a list of data with
three columns one is headed code, (same as the 10 codes), one headed Race and
one headed Gender. I am truing to count by race and by gender and by code.
For example, I am trying to count all of the Hispanics that are also males
that fit into clde 2.

--
Jerry Edge


Mike H

Count function
 
Hi,

Maybe this

=SUMPRODUCT((B2:B20="Hispanic")*(C2:C20="Male")*(A 2:A20=2))

In practice I'd use cell references

=SUMPRODUCT((B2:B20=D1)*(C2:C20=E1)*(A2:A20=F1))

Mike

"Jerry Edge" wrote:

I have a spredsheet with 10 codes and a database with a list of data with
three columns one is headed code, (same as the 10 codes), one headed Race and
one headed Gender. I am truing to count by race and by gender and by code.
For example, I am trying to count all of the Hispanics that are also males
that fit into clde 2.

--
Jerry Edge


Jerry Edge

Count function
 
i tried all of the suggestions but they did not work either. I have a chart
i am trying to complete with data from a different worksheet. Mu chart is on
one worksheet and the data is on another worksheet.

Here is what I put in the calculation line
=SUMPRODUCT((Data!C:C=B9)*(Data!D:D=Control!A4)*(D ata!E:E=Control!A9),0)

I get this symbol as an answer #NUM!

Jerry

--
Jerry Edge


"Mike H" wrote:

Hi,

Maybe this

=SUMPRODUCT((B2:B20="Hispanic")*(C2:C20="Male")*(A 2:A20=2))

In practice I'd use cell references

=SUMPRODUCT((B2:B20=D1)*(C2:C20=E1)*(A2:A20=F1))

Mike

"Jerry Edge" wrote:

I have a spredsheet with 10 codes and a database with a list of data with
three columns one is headed code, (same as the 10 codes), one headed Race and
one headed Gender. I am truing to count by race and by gender and by code.
For example, I am trying to count all of the Hispanics that are also males
that fit into clde 2.

--
Jerry Edge



All times are GMT +1. The time now is 07:28 PM.

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