Microsoft Excel – totalling or averaging a column containing an error value

If one of your cells in Excel has an error value then using the Autosum button to total or average the numbers in the cells will also result in an error.

aggregate1

I could get round this using the IFERROR function but another way to get round this is to use the AGGREGATE function.

This function has three main arguments, the function number, the options and the data range.

aggregate2

The function numbers are

  1. AVERAGE
  2. COUNT
  3. COUNTA
  4. MAX
  5. MIN
  6. PRODUCT
  7. STDEV.S
  8. STDEV.P
  9. SUM
  10. VAR.S
  11. VAR.P
  12. MEDIAN
  13. MODE.SNGL
  14. LARGE
  15. SMALL
  16. PERCENTILE.INC
  17. QUARTILE.INC
  18. PERCENTILE.EXC
  19. QUARTILE.EXCIn this case I want function 1 – AVERAGE. I am then given the choice of various options:

aggregate3

0. Ignore nested SUBTOTAL and AGGREGATE functions

  1. Ignore hidden rows, nested SUBTOTAL and AGGREGATE functions
  2. Ignore error values, nested SUBTOTAL and AGGREGATE functions
  3. Ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE functions
  4. Ignore nothing
  5. Ignore hidden rows
  6. Ignore error values
  7. Ignore hidden rows and error values

I am going to select number 6 – Ignore error values.

aggregate4

I then select the range that I want to average and type in a closing bracket. This time I have got an average of all amounts excluding the one giving me the error value.

aggregate5

Find out more about our Microsoft Excel training Sydney, Australia and our Microsoft Excel training London, Surrey, Middlesex, UK or our Microsoft Excel training Dorset, Hampshire, Wiltshire.

About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 (or 150 Aussie dollars)for every time someone says "If only I'd known that." ....
This entry was posted in Microsoft Excel, Microsoft Excel 2007, Microsoft Excel 2010, Microsoft Excel 2013 and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s