EDUCBA

EDUCBA

MENUMENU
  • Blog
  • All Courses
  • All in One Bundle
  • Login
Home Excel Excel Resources Maths Function in Excel AGGREGATE Function in Excel

AGGREGATE Function in Excel

Pradeep S
Article byPradeep S
Madhuri Thakur
Reviewed byMadhuri Thakur

Updated April 29, 2023

AGGREGATE in Excel

AGGREGATE in Excel (Table of Contents)

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

  • AGGREGATE in Excel
  • AGGREGATE Formula in Excel
  • How to Use AGGREGATE Function?

AGGREGATE in Excel

Aggregate function comprises multiple mathematical functions such as average, sum, max, min, mean, etc., along with the conditions which are customized for each of these sub-functions available under aggregate function. We can even ignore the different cells or rows, such as a blank row, error value, etc., and get the desired output. We have 19 sub-functions available in the Aggregate function with different Options.

Definition:

“Returns the AGGREGATE in a database of values or list”

It means it performs several calculations (19 Excel statistical functions)

AGGREGATE Formula in Excel

An AGGREGATE function has two types of formula

It can be noticed when you type the AGGREGATE function in an Excel cell

AGGREGATE Formula

1) AGGREGATE in Reference form

AGGREGATE Reference Formula

2) AGGREGATE in Array Formula

AGGREGATE Array Formula

Function_num: It is a number; it can be from 1 to 19. It depends on which specific function you want to use in the below-mentioned list

Here each number represents a function; it is a compulsory argument

1 to 13 are Reference forms, and 14 to 19 are array form

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.EXC

Options: is the number 0 to 7 that specifies which values to ignore for the aggregate function Note: If the options parameter is omitted, by default, options are set to 0

0: Ignore nested SUBTOTAL and AGGREGATE functions

1: Ignore nested SUBTOTAL, AGGREGATE functions, and hidden rows

2: Ignore nested SUBTOTAL, AGGREGATE functions, and error values

3: Ignore nested SUBTOTAL, AGGREGATE functions, hidden rows & error values

4: Ignore nothing

5: Ignore hidden rows

6: Ignore error values

7: Ignore hidden rows and error values

ref1, ref2, ref[3]: It is the first numeric argument for the function when using the REFERENCE syntax. It is values or numeric values on which we want to perform the computation. You must provide at least two arguments, and you can include additional arguments if needed; or the second reference, Numeric arguments should be between 2 to 253 for which you want the aggregate value

Array: An array refers to a range of cells when using the ARRAY syntax

[k]: The last 6 functions (under 1 to 19 function list): k value as a fourth argument

It is an optional argument used if we need to find out LARGE, SMALL, PERCENTILE.INC, QUARTILE.INC, PERCENTILE.EXC, or QUARTILE.EXC when using the ARRAY syntax

How to Use the AGGREGATE Function in Excel?

This AGGREGATE function is very simple and easy to use. Let us now see how to use the AGGREGATE function with the help of some examples.

You can download this AGGREGATE Function Excel Template here – AGGREGATE Function Excel Template

Example #1

The following table contains yearly sales data (2015)

AGGREGATE Example 1-1

If you run the =SUM (B8:B16) function directly in cell B17,

AGGREGATE Example 1-2

It gives the correct value because that column does not contain hidden rows, errors & nested subtotals

AGGREGATE Example 1-3

Here will calculate the SUM using an AGGREGATE function in cell B19.

=AGGREGATE(9,4,B8:B16),

AGGREGATE Example 1-4

The result will be 487.

AGGREGATE Example 1-5

  • Function_ num: For the SUM function, the function_ num is 9
  • Option: In Column B, i.e. For 2015-year sales data, all values are given, and we won’t have to ignore any values; it does not contain hidden rows, errors & nested subtotals. so we will select Option 4 (ignore nothing)
  • Array: is a range for which you want to calculate aggregate functions. Here reference range of values is B8:B16. It is selected as an array of numeric values
  • ‘k’ is an optional argument, and is used only for a function like LARGE, SMALL, PERCENTILE.EXC, QUARTILE.INC, PERCENTILE.INC or QUARTILE.EXC. We are calculating the SUM here to omit the value of k. 

Example #2

The following table contains yearly sales data (2016)

AGGREGATE Example 2-1

In column C, for the 2016 yearly sales data. In the range C8:C16, a cell C11 & C12 contains an error value (#DIV/0! & #N/A); in the AGGREGATE formula, when an appropriate option is used, the AGGREGATE in Excel gives the correct SUM value, neglecting the error value.

If you run the =SUM (C8:C16) function directly in cell C17,

AGGREGATE Example 2-2

It returns an error value due to an error in that range. Because that column contains #DIV/0! & #N/A errors.

AGGREGATE Example 2-3

To ignore the error values, we have to use option 6 in an AGGREGATE function

=AGGREGATE(9,6,C8:C16).

AGGREGATE Example 2-4

The result or output will be 334.

AGGREGATE Example 2-5

  • Function_ num: For the SUM function, the function_ num is 9
  • Option: In Column C, i.e. For 2016-year sales data, In the range C8:C16, a cell C11 & C12 contains an error value (#DIV/0! & #N/A). To ignore these errors, we will select Option 6 (Ignore error values)
  • Array: It is a range for which you want to calculate aggregate functions. Here reference range of values is C8:C16. The system has chosen it as an array of numeric values.
  • ‘k’ is an optional argument used only for functions like LARGE, SMALL, PERCENTILE.EXC, QUARTILE.INC, PERCENTILE.INC or QUARTILE.EXC. We are calculating the SUM here to omit the value of k.

When an appropriate option is used in the AGGREGATE function, the AGGREGATE in Excel returns or gives the SUM of the remaining values neglecting the error value in cells C11 & C12. i.e. 334

Example #3

The following table contains yearly sales data (2017)

AGGREGATE Example 3-1

In column D, for the 2017 yearly sales data. In the range D8:D16, cell D9 is a blank cell or hidden row & D12 contains an error value (#N/A). In the AGGREGATE formula, when an appropriate option is used, the AGGREGATE in Excel gives the correct SUM value, neglecting the hidden row & error value.

If you run the =SUM (D8:D16) function directly in cell D17,

AGGREGATE Example 3-2

It returns an #N/A error value due to an error in that range. Because that column contains #N/A error & hidden row or blank value.

AGGREGATE Example 3-3

=AGGREGATE(9,7,D8:D16),

AGGREGATE Example 3-4

The result or output will be 262

AGGREGATE Example 3-5

  • Function_ num: For the SUM function, the function_ num is 9
  • Option: In column D, for the 2017 yearly sales data. In the range D8:D16, cell D9 is a blank cell or hidden row & D12 contains an error value (#N/A). To ignore these errors, we will select Option 7 (Ignore hidden rows and error values)
Note: you can hide rows by selecting the row(s) > right-click on a specific row > Hide
  • Array: It is a range for which you want to calculate aggregate functions. Here reference range of values is D8:D16. It is selected as an array of numeric values
  • ‘k’ is an optional argument and is used only for a function like LARGE, SMALL, PERCENTILE.EXC, QUARTILE.INC, PERCENTILE.INC or QUARTILE.EXC. We are calculating the SUM here to omit the value of k.

when an appropriate option is used in an AGGREGATE function, the AGGREGATE in Excel returns or gives the SUM of the remaining values neglecting the error value in cells D9 & D12. i.e. 262

Things to Remember

  • The AGGREGATE function is applicable only for vertical ranges or columns of data. It is not designed for horizontal range or rows of data.
  • It has a limitation; it only ignores the hidden rows; it does not ignore the hidden columns.
  • An AGGREGATE function is applicable only for the numeric value
  • Function _ num argument value should not exceed 19 or less than 1. Similarly, for option argument should not be greater than 7; otherwise, it will give #VALUE! error
  • In the AGGREGATE function, if in function number argument, if you are using 14 to 19 (LARGE, SMALL, PERCENTILE.EXC, QUARTILE.INC, PERCENTILE.INC or QUARTILE.EXC), the “K” argument should be used. g. =AGGREGATE(15, 6, A1:A9, 3). If the “K” value or second reference argument is ignored, it will result in a #VALUE! error

Recommended Articles

This has been a guide to AGGREGATE Function. Here we discuss the AGGREGATE Formula and how to use the AGGREGATE Function, practical examples, and downloadable Excel templates. You can also go through our other suggested articles –

  1. Excel Formula of Percentage
  2. Logical Functions in Excel
  3. Excel Percentage Difference
  4. Excel SUMIF with OR
MICROSOFT POWER BI Course Bundle - 8 Courses in 1
34+ Hours of HD Videos
8 Courses
Verifiable Certificate of Completion
Lifetime Access
4.5
MS Excel & VBA for Data Science Course Bundle - 24 Courses in 1 | 10 Mock Tests
87+ Hours of HD Videos
24 Courses
10 Mock Tests & Quizzes
Verifiable Certificate of Completion
Lifetime Access
4.5
All-in-One Financial Analyst Masters Training Program Bundle - 550+ Courses | 300+ Mock Tests | 2000+ Hours | Lifetime |
2000+ Hours of HD Videos
43 Learning Paths
550+ Courses
Verifiable Certificate of Completion
Lifetime Access
4.9
All-in-One Data Science Bundle - 400+ Courses | 550+ Mock Tests | 2000+ Hours | Lifetime |
2000+ Hour of HD Videos
80 Learning Paths
400+ Courses
Verifiable Certificate of Completion
Lifetime Access
4.7
Primary Sidebar
Popular Course in this category
MS Excel Course Bundle - 36 Courses in 1 | 13 Mock Tests
 137+ Hours of HD Videos
36 Courses
13 Mock Tests & Quizzes
  Verifiable Certificate of Completion
  Lifetime Access
4.9
Price

View Course
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download AGGREGATE Function Excel Template

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download AGGREGATE Function Excel Template

EDUCBA

डाउनलोड AGGREGATE Function Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more