Forum Discussion
How to exclude specific cells from an AutoSum?
Now, let me ask: how is the data arranged in the first place that would cause you to need to exclude some records? There may be an entirely legitimate reason, but it sounds like there are many things that do belong together, but others that don't. So why are they there in the first place? As I said, maybe a totally valid reason....I'm just curious whether there's an underlying design issue here.
mathetes Thanks for recommending AVERAGEIFS, that will come in handy.
To answer your question, the reason I was trying exclude specific cells is because I had some div/0 things happening that were making it so my AutoSum Average, Median, and Quartiles weren't working. I realized there were very few instances of div/0 though, so I just manually turned them into zeros and the functions calculated out correctly.
- mathetesDec 07, 2019Silver Contributor
ElJarrod Wyn's suggestion is a better one than turning those error messages into zero--doing that will distort (perhaps only slightly) the averages that result.
If possible though (and maybe it's just not that important), it would be better overall to deal with the underlying problem and eliminate those DIV/0 errors to begin with.
- Wyn HopkinsDec 07, 2019MVP
You can also use AGGREGATE to ignore errors = AGGREGATE(1,6, A1:A10) will Average and Ignore errors
Cheers
Wyn