Question : Excel Average Need to ignore #n/a values

Hi,

I have a spreadsheet with one column of data based on a VLOOKUP from another sheet. Meaning, I select a value from a drop down list and it automatically populates a currency value in the next column depending on the selection. For the rows that do not have a value selected, the currency value in the next column just displays #N/A (not very professional, but doesn't really bother me). In a third field, I want to show the average of all the currency. When I add the formula, =AVERAGE(J1:J20) - I get an error because only J1:J5 has currency values; all the rest are error messages. I saw another post in here talking about a similar thing - and the assisted answer was that the average formula would ignore non numeric values - however, i've found this to be untrue. Any help would be greatly appreciated.

Thanks!
Michelle

Answer : Excel Average Need to ignore #n/a values

AVERAGE function ignores text and logical value (TRUE/FALSE) but not errors

You can use an array formula like this

=AVERAGE(IF(ISNUMBER(J1:J20),J1:J20))

which needs to be confirmed with CTRL+SHIFT+ENTER so that curly braces appear around the formula in the formula bar

Perhaps simpler, if you have no negative values

=SUMIF(J1:J20,">0")/MAX(1,COUNT(J1:J20))

regrads, barry

Random Solutions  
 
programming4us programming4us