Try one of these...Ive done searching and found ignoring 0 all over the place and one for ignoring na but the individual made his 0 na. For graphing reasons i need keep the 0 so i need to the avg to ignore both NA and 0. Whats the best way to do this?
Book1 | |||
---|---|---|---|
A | |||
1 | 98 | ||
2 | 0 | ||
3 | 31 | ||
4 | 28 | ||
5 | 0 | ||
6 | _ | ||
7 | #N/A | ||
8 | 41 | ||
9 | #N/A | ||
10 | 38 | ||
Sheet1 |
Ive done searching and found ignoring 0 all over the place and one for ignoring na but the individual made his 0 na. For graphing reasons i need keep the 0 so i need to the avg to ignore both NA and 0. Whats the best way to do this?
Control+shift+enter, not just enter:
=AVERAGE(IF(ISNUMBER(A2:A40),IF(A2:A40>0,A2:A40)))
will average all positive values from A2:A40.
If you're using Excel 2007 or later...
=AVERAGEIFS(A1:A10,A1:A10,"<>0",A1:A10,"<1E100")
Thak but i need to include both positve and negative numbers for functionality....
1E100 is scientific notation for a very large number. 1 followed by 100 zeros. 1E100 is a really gigantic number!This works great but what does "<1E100" do to this formula or what does it mean?Originally Posted by T. Valko
If you're using Excel 2007 or later...
=AVERAGEIFS(A1:A10,A1:A10,"<>0",A1:A10,"<1E100")
Matchematicians do not like the idea of excluding 0's while both positive and negatives are included...