Count number of items in one column that have a value in another?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet that I would like to count the number of occurrences of
a particular value in one column that also have a particular value in another.

For instance, I want the number of times the value in column B = Yes when
the value in column C = 0.

I've tried using COUNTIF and SUMIF, but they both give me the result of the
two arguments added together as opposed to how many contain both values.

I would certainly appreciate any ideas.

Thanks.
 
Add a formula in Col D (or wherever) that concatenates B and C (eg =B1&C1),
then do a COUNTIF on Col D (eg =COUNTIF(D:D,"YES0")

HTH Best rgds
Chris Lav
 
Add a formula in Col D (or wherever) that concatenates B and C (eg =B1&C1),
then do a COUNTIF on Col D (eg =COUNTIF(D:D,"YES0")

HTH Best rgds
Chris Lav
 
onthefritz wrote...
I have a spreadsheet that I would like to count the number of occurrences of
a particular value in one column that also have a particular value in another.

For instance, I want the number of times the value in column B = Yes when
the value in column C = 0.
....

No need to use additional supporting cells/ranges. Try something like

=SUMPRODUCT(--(B2:B1001="Yes"),--(C2:C1001=0))
 
onthefritz said:
I have a spreadsheet that I would like to count the number of occurrences of
a particular value in one column that also have a particular value in another.

For instance, I want the number of times the value in column B = Yes when
the value in column C = 0.

I've tried using COUNTIF and SUMIF, but they both give me the result of the
two arguments added together as opposed to how many contain both values.

I would certainly appreciate any ideas.

Thanks.

Chris Lav -

Thanks for the help. This worked great!

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top