Search code examples
if-statementgoogle-sheetsfilteraveragenested-if

Calculate Average of cells that two requirements


How would I work out the average of a range where it has to meet two requirements.

In the example below, I would like to calculate the average 'Score' of all of the 'Type 1' results that are within August 2022.

enter image description here


Solution

  • try:

    =AVERAGE(FILTER(C:C; YEAR(A:A)=2022; MONTH(A:A)=8; B:B="Type 1"))
    

    or even AVERAGEIFS can be used