The AGGREGATE function returns an aggregate in a list or database. Users can apply different aggregate functions like COUNT, AVERAGE, SUM, MAX, MIN etc. to a list while ignoring "error values" and "hidden rows" in the spreadsheets.
Aggregate function is useful especially when:
While working with AGGREGATE function, users can use the following syntax:
This function has the following arguments:
| Argument | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Function_num |
[Required], Refers to the number (within the range 1-19) to specify the function that is being used. Note: It is important to note that when "function_num" contains values ranging from 1 to 13, the syntax applicable is : AGGREGATE(function_num, options, ref1, [ref2], …) and when the "function_num" contains values ranging from 14 to 19, the syntax applicable is AGGREGATE(function_num, options, array, k).
|
||||||||||||||||||||||||||||||||||||||||
| Options |
[Required], Refers to a particular number that specifies the options to ignore values in the function.
|
||||||||||||||||||||||||||||||||||||||||
| Ref1 | [Required], Specifies the reference to a range of cells. | ||||||||||||||||||||||||||||||||||||||||
| Ref2 | [Optional], Specifies the reference to a range of cells. | ||||||||||||||||||||||||||||||||||||||||
| array | [Required but only when "function_num" argument above contains values ranging from 14 to 19], Specifies an array, an array formula, or a reference to a range of cells. | ||||||||||||||||||||||||||||||||||||||||
| k | [Required], This argument is required to specify the functions when the "function_num" values are ranging from 14-19. |
Note: The following things must be kept in mind while using the AGGREGATE function:
Accepts a list or a database of numeric values. Returns aggregate calculation like AVERAGE, COUNT, MIN, MAX etc. while ignoring hidden rows and errors.
The following image depicts four different examples of the AGGREGATE function:
Let's say you have a spreadsheet with some values in column A and the aggregate functions are applied to cells B1, B2, B3, and B4 as shown in the column B below.
The formula output results are displayed in column C and the description of the formula used is mentioned in column D.
Clearly, the AGGREGATE formula in the cells B1 and B2 used multiple cell references [Syntax 1 explained above] but the formula in the cells B3 and B4 used the array form of the function [Syntax 2 explained above].