Forum Discussion
kyledupic
Jan 05, 2024Copper Contributor
AVERAGEIFS eliminate zeros DIV/0 error
I'm trying to average using multiple criteria now because it is taking into account the zeros if I just use AVERAGEIF (see screenshot where top formula was working, but including zeros). I tried an A...
SnowMan55
Jan 05, 2024Bronze Contributor
Or if you do not want to use the IFERROR function (which could hide other errors in the data), you could use this formula, which checks for a positive sum before attempting the AVERAGEIFS:
=IF( SUMIFS($F$2:$F$42, $B$2:$B$42,"Tuesday")>0, AVERAGEIFS($F$2:$F$42, $B$2:$B$42,"Tuesday", $F$2:$F$42,">0"), "-" )
(Additional spaces included for readability.)