Excel Help - Counting Multiple Conditions & Multiple Values

  • Thread starter Thread starter MAX258
  • Start date Start date
M

MAX258

Here is what I need to do. I have one range with text data, and I have
one range with numeric data. I need a formula to count the number of
times the first range has certain text, and the second range has a
number > than zero.

For example

Red
 
Sorry, left out a unary minus:

=SUMPRODUCT(--(A1:A100="Red"),--(B1:B100>0))

You left out two unary minuses, but that leads to a possible simplification.

=SUMPRODUCT(-(A1:A100="Red"),-(B1:B100>0))
 
Thanks so much again for your help. This time it is just giving me the
number of "Reds" and not returning a value for the >0.
 
I don't understand.

The formula should give you the number of "Reds" for which the value
in the corresponding column is >0. If it returns anything, it should
be counting for that intersection.

I perhaps misunderstood your criteria. If you want the total number
of Reds and the total number of values > 0 to be counted, use:

=COUNTIF(rng1, "Red") + COUNTIF(rng2, ">0")
 
Back
Top