View Single Post
  #5   Report Post  
ryesworld
 
Posts: n/a
Default How do you count data that matches more than one condition?

Hi RagDyer...

I'd like to use your formula, "=SUM(COUNTIF(Sheet1!E1:E20,{"aa","bb"}))",
with your other formula from my other posting,
"=SUMPRODUCT((Sheet1!A1:A20=C1)*(Sheet1!B1:B20=D1) )". In other words,
Sheet1!B1:B20=D1 or D2. (D1 is "aa" and D2 is "bb"). A number count should
only be retuned if all data ranges are true. (ie: if a zero was retuned from
either formula, zero will be the answer)

I hope that makes sense....

"RagDyer" wrote:

Another way:

=SUM(COUNTIF(A:A,{"aa","bb"}))
--
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"ryesworld" wrote in message
...
Hi All:
I need a formula that will count the number of occurences that a column
contains either "text string A" or "text string B".