I want to calculate the average over a range (B1:B12 or C1:C12 in the figure), excluding:
#NA
, text, etc. (B1+B8:B12 or C1+C8:C12 here).I think it is not possible to use any built-in AVERAGE
-like function. Then, I tried calculating the sum, the count, and divide. I can calculate the count (F2 and F7), but not the sum (F3), when I have #N/A
in the range, e.g.
How can I do this?
Notes:
SUBTOTAL
.From https://stackoverflow.com/a/30242599/2103990:
Providing you are using Excel 2010 and above the AGGREGATE function can be optioned to ignore all errors.
=AGGREGATE(1, 6, A1:A5)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With