• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to solve averageif function error ?

hi i have some formula which can like to average if not -"error or 0".pls suggest me how to solve this formula or through any other formula:
that is error how to solve that ?
AVERAGEIF((12*4);(16*9),"<>0")
 
AVERAGEIF, like the other xxxIF functions, only works on ranges. You could put those formulas into ranges and refer to them.
 
but sir i want to ignore 0 for average of 3 formula result
example :=AVERAGE(IFERROR(5*4,0),IFERROR(10*1,0),IFERROR(22*0,0))
the result is 10 but i need result 15 because ignore to 0 for average calculation
how to solve this ?
 
Code:
=LET(a,IFERROR(CHOOSE({1,2,3},5*4,10*1,22*0),0),AVERAGE(FILTER(a,a<>0)))
or
Code:
=LET(a,IFERROR(CHOOSE({1,2,3},5*4,10*1,22*0),0),AVERAGE(IF(a<>0,a)))
Note that 22*0 does not raise an error.
Do you really have formulae with values manually typed in like that?!
 
Code:
=LET(a,IFERROR(CHOOSE({1,2,3},5*4,10*1,22*0),0),AVERAGE(FILTER(a,a<>0)))
or
Code:
=LET(a,IFERROR(CHOOSE({1,2,3},5*4,10*1,22*0),0),AVERAGE(IF(a<>0,a)))
Note that 22*0 does not raise an error.
Do you really have formulae with values manually typed in like that?!
many many thx sir
 
Back
Top