• 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.

Averageifs produces DIV/O, but average if does not?

Calculating months on market..


When I just average if "building type" than I get accurate numbers


When I averageifs "submarket" and "building type" I get DIV/O error..


Why is this?
 
When using an AVERAGEIFS, the function considers all the criteria as being "and" type statements. As nothing can be BOTH submarket and building type, this results in no values being fed into the function, and you get 0/0, causing an error.
 
No problem. One way to get around would be to add up some SUMIF and COUNTIF functions and divide, like:

=(SUMIF(Range1,Crit1,Range2)+SUMIF(Range1,Crit2,Range2))/(COUNTIF(Range1,Crit1)+COUNTIF(Range1,Crit2))
 
Back
Top