Note: The other languages of the website are Google-translated. Back to English

Excel AGGREGATE function

doc aggregate function 1

Description

Syntax and Arguments

Usage and Examples


Description

The Excel AGGREGATE function returns an aggregate of calculations such as SUM, COUNT, SMALLL and so on with the option to ignore errors and hidden rows.

Syntax and arguments

Formula syntax

=AGGREGATE(function_num, options, ref1, [ref2])

Arguments

  • Function_num: Required. A number 1 to 19 that specifies which function you want to use. Below table lists all function numbers which are available to the AGGREGATE function, first column is the function number, the second column is the function name, and the third column indicates if the relative function needs the second argument value.
  • Options: Required. A number that decides to ignore the error values or hidden rows while using the function.
  • Ref1: Required. The first numeric argument.
  • Ref2: Optional. The second numeric argument [k].
Function_num Argument
Function Ref2
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 k
15 SMALL k
16 PERCENTILE.INC k
17 QUARTILE.INC quark
18 PERCENTILE.EXC k
19 QUARTILE.EXC quark
Options Argument Behavior
0 or omitted Ignore SUBTOTAL and AGGREGATE functions
1 Ignore hidden rows, SUBTOTAL and AGGREGATE functions
2 Ignore errors, SUBTOTAL and AGGREGATE functions
3 Ignore hidden rows and error values, SUBTOTAL and AGGREGATE functions
4 Ignore nothing
5 Ignore hidden rows
6 Ignore error values
7 Ignore hidden rows and error values

Return Value

The AGGREGATE function's return depends on function specified.

Notes:

If a second ref argument is required but not provided, the AGGREGATE function returns a #VALUE! error.

The AGGREGATE function does not work with 3D references.

Usage and Examples

Here lists some examples for you to understand the AGGREGATE function.

Below is the data you use

  A
1 34
2 #NUM!
3 36
4 72
Formula Description Result
=AGGREGATE(5,6,A1:A4) Find the minimum value and ignore errors in range A1:A4 34
=AGGREGATE(14,6,A1:A4,2) Find the second largest value and ignore errors in range A1:A4 36
=AGGREGATE(15,6,A1:B1) Don’t provide the second ref argument that the SMALL function requires. #VALUE!

See screenshot shown:
doc aggregate function 2


Sample File
doc sample file


The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet

Follow Us

Copyright © 2009 - www.extendoffice.com. | All rights reserved. Powered by ExtendOffice. | Sitemap
Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.
Protected by Sectigo SSL