Forum Discussion

Hr's avatar
Hr
Copper Contributor
Oct 20, 2022

Averageifs function divide by zero error

I trying to get the correct average of just the q1 and q3 values using averageifs function. Have looked a lot online but couldn't find a solution. However, someone kindly did help me here on MS commu...
  • JKPieterse's avatar
    Oct 20, 2022
    That is due to the empty cells in your data, to cater for those we need an additional check:
    =AVERAGE(IF((H2:H13<>"")*((G2:G13="Q1")+(G2:G13="Q3"))>0,H2:H13,""))

Share