I have a Google sheet as follows:
I am counting all "yes" in column B based on the formula =COUNTIF(B2:B6,"Yes")
.
However, I would like to exclude row 5 based on the value "EXCLUDE" in column A.
How can I perform such filtering?
CodePudding user response:
you can try either:
=COUNTIFS(B2:B6,"Yes",A2:A6,"<>"&"EXCLUDE")
OR
=COUNTA(IFNA(FILTER(B:B,B:B="yes",A:A<>"EXCLUDE")))
CodePudding user response:
try:
=SUMPRODUCT(B2:B6="yes"; A2:A6<>"exclude")