0

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.

1 Answer 1

1

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

3
  • Thank you. Can it output only the avg value and not the "Average if ABC/Yes" label? Commented Jun 18, 2020 at 0:27
  • Please see the edited answer.Also, please remember that as per site guidelines when an answer addresses your question, you should accept it and even upvote it so others can benefit as well. Commented Jun 18, 2020 at 1:02
  • Amazing, thank you! Commented Jun 18, 2020 at 1:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.