# Need to count no. of rows where cell in column A = "value1" AND cellin column B (same row) = "value2

B

#### bcnewell

I need to count the number of rows where a cell in column A has a value of "value1" AND a cell in column B has a value of "value2".

For example, I want to be able to count how many of my survey respondents answered, in column A (age) "25-34" AND where those same respondents also answered "Female" in column B.

Thus if 100 respondents said "25-34" in A, and 50 of those 100 also said "Female" in B, then the count should return "50".

If I can figure this out, I'd like to add another limiter in, to count the number of rows where, e.g., A="25-34" AND B="Female" AND C="Liberal".

N

#### Norman Jones

I need to count the number of rows where a cell in column A has a value of
"value1" AND a cell in column B has a value of "value2".

For example, I want to be able to count how many of my survey respondents
answered, in column A (age) "25-34" AND where those same respondents also

Thus if 100 respondents said "25-34" in A, and 50 of those 100 also said
"Female" in B, then the count should return "50".

If I can figure this out, I'd like to add another limiter in, to count the
number of rows where, e.g., A="25-34" AND B="Female" AND C="Liberal".

Hi BC,

Try using the sumproduct function

=SUMPRODUCT((A1:A100>=25)*(A1:A100<=34)*(B1:B100="Female")*(C1:C100="Liberal"))

Change the range to suit your requirements.

===
Regards,
Norman

B

#### Bryce

Thank you very much, Norman!

Hi BC,

Try using the sumproduct function

=SUMPRODUCT((A1:A100>=25)*(A1:A100<=34)*(B1:B100="Female")*(C1:C100="Liberal"))

Change the range to suit your requirements.

===

Regards,

Norman