AVERAGEIFS()要求所有范围必须具有相同的大小和形状。您将三个整列与5列宽和8行高的范围进行比较。
使用SUMPRODUCT:
=SUMPRODUCT(ISNUMBER(SEARCH(" Male "," " & B2:B9 & " "))*ISNUMBER(SEARCH("Artist",C2:C9))*D2:H9)/SUMPRODUCT(ISNUMBER(SEARCH(" Male "," " & B2:B9 & " "))*ISNUMBER(SEARCH("Artist",C2:C9))*(D2:H9>0))
请注意" Male "
周围的空格,它会选择male
中的Female
。