|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
AVERAGE(IFERROR((SUMIFS(外购入库序时簿!$J:$J,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2017/3/1",外购入库序时簿!$A:$A,"<="&"2017/3/31")/SUMIFS(外购入库序时簿!$K:$K,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2017/3/1",外购入库序时簿!$A:$A,"<="&"2017/3/31")),""),IFERROR((SUMIFS(外购入库序时簿!$J:$J,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2018/3/1",外购入库序时簿!$A:$A,"<="&"2018/3/31")/SUMIFS(外购入库序时簿!$K:$K,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2018/3/1",外购入库序时簿!$A:$A,"<="&"2018/3/31")),""),IFERROR((SUMIFS(外购入库序时簿!$J:$J,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2019/3/1",外购入库序时簿!$A:$A,"<="&"2019/3/31")/SUMIFS(外购入库序时簿!$K:$K,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2019/3/1",外购入库序时簿!$A:$A,"<="&"2019/3/31")),""),IFERROR((SUMIFS(外购入库序时簿!$J:$J,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2020/3/1",外购入库序时簿!$A:$A,"<="&"2020/3/31")/SUMIFS(外购入库序时簿!$K:$K,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2020/3/1",外购入库序时簿!$A:$A,"<="&"2020/3/31")),""),IFERROR((SUMIFS(外购入库序时簿!$J:$J,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2021/3/1",外购入库序时簿!$A:$A,"<="&"2021/3/31")/SUMIFS(外购入库序时簿!$K:$K,外购入库序时簿!$C:$C,B366,外购入库序时簿!$A:$A,">="&"2021/3/1",外购入库序时簿!$A:$A,"<="&"2021/3/31")),"")
有的月份没有数值,如果不用IFERROR将是一个错误数值,如果将""改为0,则有计算结果,但计算结果是错误的。好比正确果应当为5,计算结果却为4.8。
如果每月都有数值,不管使用AVERAGE还是使用AVERAGEA,则有计算结果,但计算结果是错误的。好比正确结果应当为5,计算结果却为4.8。
请高手帮忙指出公式错在哪?正确公式应如何设置,谢谢!!
|
|