I have an array formula that calculates the average of a column if two other columns meet a certain criteria (company department and year).
=Average(IF(dBaseMaster!$DO$2:$DO$81="HR",IF(Year(dBaseMaster!AH2:AH81)=2010,dBaseMaster!DN2:DN81))),0,Average(IF(dBaseMaster!$DO$2:$DO$81="HR",IF(Year(dBaseMaster!AH2:AH81)=2010,dBaseMaster!DN2:DN81)))
I get a DIV/0 error when the criteria isn't met. I tried to add an IF(IS ERROR in the front of the formula, but it says that there is an error and highlights the ,0, in the middle of the formula.
Any ideas?
=Average(IF(dBaseMaster!$DO$2:$DO$81="HR",IF(Year(dBaseMaster!AH2:AH81)=2010,dBaseMaster!DN2:DN81))),0,Average(IF(dBaseMaster!$DO$2:$DO$81="HR",IF(Year(dBaseMaster!AH2:AH81)=2010,dBaseMaster!DN2:DN81)))
I get a DIV/0 error when the criteria isn't met. I tried to add an IF(IS ERROR in the front of the formula, but it says that there is an error and highlights the ,0, in the middle of the formula.
Any ideas?