在Excel中使用averageIF时的值#错误

时间:2018-02-16 13:48:04

标签: excel average

当我尝试在以下数据上使用AVERAGEIFS函数时,我收到以下错误VALUE:

enter image description here

以下是我的AVERAGEIFS功能:

  =AVERAGEIFS(D2:H9,A:C,"*Male*",A:C,"*Artist*")

您能告诉我为什么会收到此错误吗?

1 个答案:

答案 0 :(得分:1)

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

enter image description here