Home > OS >  Google Sheets - Count how many Rows match these conditions
Google Sheets - Count how many Rows match these conditions

Time:09-27

I got an issue with Queries in Google Sheets.

I have these 3 Columns:

enter image description here

I would like to COUNT how many Rows have "A" in the first column and the SUM of B and C is more than 2.

This is the Query I tried:

=QUERY(Sheet5!A1:C7,"select COUNT(A) where A='A' and B C>1 LABEL COUNT(A) ''", 1)

(I used LABEL COUNT(A) '' just to remove the header, the result doesn't change without it)

What am i doing wrong?

By using this Query, I get 1 as result (and it should be 2)

CodePudding user response:

Try

=QUERY(Sheet5!A1:C7,"select COUNT(A) where A='A' and B=1 and C=1 LABEL COUNT(A) ''", 1)

enter image description here

CodePudding user response:

=QUERY(Sheet5!A1:C7,"select COUNT(A) where A='A' and B C>1 LABEL COUNT(A) ''", 0)

CodePudding user response:

=COUNTIF(FILTER(A:C,A:A="A",B:B C:C>1),"<>")/3
  • Related