Google Sheets – Calculate Average Across Rows Matching ID and Word

google sheetsgoogle-sheets-filtergoogle-sheets-query

Table is as follows:

enter image description here

I want calculate the average of values in column C for rows with value "ABC" in column A and value "Yes" in column B.

So, basically, the average of values 2 and 4.

Best Answer

EDIT
(following OP's request)

To completely skip any header (display nothing instead of some words) please use

=QUERY(A1:C4,"select avg(C) where A='ABC' and B='Yes' label avg(C) '' ")

Please notice the pair of single quotes in the end


You can use this query formula:

=QUERY(A1:C4,"select avg(C) where A='ABC' and B='Yes' label avg(C) 'Average if ABC/Yes' ")

enter image description here

More about QUERY