Funció AGREGAT

This function returns an aggregate result of the calculations in the range. You can use different aggregate functions listed below. The Aggregate function enables you to omit hidden rows, errors, SUBTOTAL and other AGGREGATE function results in the calculation.

note

AGGREGATE function is applied to vertical ranges of data with activated AutoFilter. If AutoFilter is not activated, automatic recalculation of the function result does not work for newly hidden rows. It is not supposed to work with horizontal ranges, however it can be applied to them as well, but with limitations. In particular, the AGGREGATE function applied to a horizontal data range does not recognize hiding columns, however correctly omits errors and results of SUBTOTAL and other AGGREGATE functions embedded into the row.


Sintaxi

AGGREGATE(Function; Option; Number 1[; Number 2][; ... ;[Number 253]])

o

AGGREGATE(Function; Option; Array[; k])

Function – obligatory argument. A function index or a reference to a cell with value from 1 to 19, in accordance with the following table.

Índex de funcions

Funció aplicada

1

MITJANA

2

COMPTA

3

COMPTAA

4

MAX

5

MIN

6

PRODUCTE

7

DESVEST.S

8

DESVEST.P

9

SUMA

10

VAR.S

11

VAR.P

12

MEDIANA

13

MODA.UN

14

GRAN

15

PETIT

16

PERCENTIL.INC

17

QUARTIL.INC

18

PERCENTIL.EXC

19

QUARTIL.EXC


Option – obligatory argument. An option index or reference to a cell with value from 0 to 7 determines what to ignore in the range for the function.

Índex de l'opció

Opció aplicada

0

Ignore only nested SUBTOTAL and AGGREGATE functions

1

Ignore only hidden rows, nested SUBTOTAL and AGGREGATE functions

2

Ignore only errors, nested SUBTOTAL and AGGREGATE functions

3

Ignore hidden rows, errors, nested SUBTOTAL and AGGREGATE functions

4

No ignora res

5

Ignora només les files amagades

6

Ignora només els errors

7

Ignora només les files amagades i els errors


Number1 – required argument. The first numeric argument (if the range is set by a list of values inside the function) or a reference to a cell that contains it.

Number2, 3, ... – optional. A numeric argument or a reference to a cell (up to 253 arguments), for which you need the aggregate value.

Array – required argument. The array can be specified by the boundaries of the range, the name of the named range or the column label.

note

Per a utilitzar etiquetes de columna cal activar la funció «Cerca automàticament les etiquetes de columna i fila».


k – required argument for the following functions: LARGE, SMALL, PERCENTILE.INC, QUARTILE.INC, PERCENTILE.EXC, QUARTILE.EXC. It is a numeric argument, which must correspond to the second argument of these functions.

Exemples

A

B

C

1

ColumnaUn

ColumnaDos

ColumnaTres

2

34

11

12

3

10

56

35

4

#DIV/0!

5

3

5

20

8

1

6

0

8

9

7

#VALOR!

20

21

8

5

7

8

9

14

0

5


=AGGREGATE(4;2;A2:A9)
Returns maximum value for the range A2:A9 = 34.

=AGGREGATE(9;5;A5:C5)
Returns sum for the range A5:C5 = 29, even if some of the columns are hidden.

=AGGREGATE(9;5;B2:B9)
Returns sum of the column B = 115. If any row is hidden, the function omit its value, for example if the 7th row is hidden, the function returns 95.

Si heu d'aplicar la funció a un interval 3D, aquest exemple il·lustra com fer-ho.

=AGGREGATE(13;3;Sheet1.B2:B9:Sheet3.B2:B9)
The function returns mode of the values of second columns through sheets 1:3 (that have the same data) = 8.

You can use reference to a cell or a range for every argument in the formula. The following example shows how it works. Besides, it shows that you can use column labels to specify an array.

=AGGREGATE(E3;E5;'ColumnOne')
If E3 = 13 and E5 = 5, the function returns mode of the first column = 10.

Informació tècnica

tip

Aquesta funció és disponible des de la versió 4.4 del LibreOffice.


This function is not part of the Open Document Format for Office Applications (OpenDocument) Version 1.3. Part 4: Recalculated Formula (OpenFormula) Format standard. The name space is

COM.MICROSOFT.AGGREGATE

Ens cal la vostra ajuda!