AVERAGE from AVERAGEIFs that will ignore AVERAGEIFs where is ERROR EXCEL

笑着哭i 提交于 2020-01-06 07:53:06

问题


I am trying to calculate AVERAGE from five AverageIFs:

AVERAGE(AVERAGEIFs1,AVERAGEIFs2,AVERAGEIFs3,AVERAGEIFs4,AVERAGEIFs5)

in AverageIFs2 and AverageIFs4 I am receiving #DIV/0! . How to calculate AVERAGE from AverageIFs that are not have errors only?

Adding IFERROR, IF(ISERROR) etc before AverageIf is not resolving problem.


回答1:


It's rather tedious, but you might have to do something like this:

    =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)))

EDIT

=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))

is a bit shorter - Count ignores any #DIV/0!



来源:https://stackoverflow.com/questions/54219892/average-from-averageifs-that-will-ignore-averageifs-where-is-error-excel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!