我正在尝试从五个AverageIF计算平均值:
AVERAGE(AVERAGEIFs1,AVERAGEIFs2,AVERAGEIFs3,AVERAGEIFs4,AVERAGEIFs5)
在AverageIFs2和AverageIFs4中的我收到#DIV / 0! 。 如何从不仅没有错误的AverageIF中计算AVERAGE?
在AverageIf之前添加IFERROR,IF(ISERROR)等无法解决问题。
答案 0 :(得分:0)
这很繁琐,但您可能需要执行以下操作:
=SUM(IFERROR(AVERAGEIFS(A1:A2,A1:A2,">"&0),0),IFERROR(AVERAGEIFS(B1:B2,B1:B2,">"&0),0),IFERROR(AVERAGEIFS(C1:C2,C1:C2,">"&0),0))
/SUM(--ISNUMBER(AVERAGEIFS(A1:A2,A1:A2,">"&0)),--ISNUMBER(AVERAGEIFS(B1:B2,B1:B2,">"&0)),--ISNUMBER(AVERAGEIFS(C1:C2,C1:C2,">"&0)))
编辑
=SUM(IFERROR(AVERAGEIFS(A1:A2,A1:A2,">"&0),0),IFERROR(AVERAGEIFS(B1:B2,B1:B2,">"&0),0),IFERROR(AVERAGEIFS(C1:C2,C1:C2,">"&0),0))
/COUNT(AVERAGEIFS(A1:A2,A1:A2,">"&0),AVERAGEIFS(B1:B2,B1:B2,">"&0),AVERAGEIFS(C1:C2,C1:C2,">"&0))
短一些-Count忽略任何#DIV / 0!