HI
If I have a simple range G4:G17 and I want to calculate an average of the range you would use Average(G4:G17). However if the range sometimes contains DIV/0 in a field how would I calculate the average of the range.
I thought that if I said to sumif the range if not div/0 and divide it by the countif not div/0 I would get the range average. But I must be writing it wrong its not working.
My Code:
If I have a simple range G4:G17 and I want to calculate an average of the range you would use Average(G4:G17). However if the range sometimes contains DIV/0 in a field how would I calculate the average of the range.
I thought that if I said to sumif the range if not div/0 and divide it by the countif not div/0 I would get the range average. But I must be writing it wrong its not working.
My Code:
Code:
=(SUMIF((G4:G17,"<>#DIV/0!")))/(COUNTIF(IF(G4:G17,"<>#DIV/0!")))