The correct query to use is: =AVERAGEIFS( E2:E2402, D2:D2402,"Team 3", AK2:AK2402 ,"FY22 Q4") that is (order of elements): scores teamNames TeamType quarter quarterType