UNIQUE

Returns the array of unique values from a range or array of values.

Syntaxe

UNIQUE(Matrice [ Par col], [ Unicité])

Array: the range or array from which to return unique values.

By col: (optional) a logical value that indicates how to compare data: TRUE - compares data horizontally for a match of all cells in each column, across all columns. FALSE or omitted (default) - compares data vertically, for a match of all cells of each row, across all rows.

Uniqueness: (optional) A logical value that defines which values are considered unique. TRUE returns values that occur only once. The default is FALSE or omitted, which returns all distinct values in the range or array.

note

The UNIQUE function must be entered as an array formula.


Exemples

Given the data table below, the examples returns unique occurrences of grades and age.

A

B

C

D

E

1

Nom

Grade

Âge

Distance

Poids

2

André

3

9

150

40

3

Betty

4

10

1000

42

4

Charles

3

10

300

51

5

Daniel

5

11

1200

48

6

Eva

2

8

650

33

7

Franck

2

7

300

42

8

Aïcha

1

7

200

36

9

Pierre

3

9

1200

44

10

Irène

2

8

1000

42

11


Example 1

{=UNIQUE(B1:C10, FAUX(), FAUX())} renvoie la matrice ci-dessous. Les notes et les âges des lignes avec les noms Andy et Harry ne sont renvoyés qu'une seule fois. Il en va de même pour les lignes avec les noms Eva et Irène.

Grade

Age

3

9

4

10

3

10

5

11

2

8

2

7

1

7


Example 2

{=UNIQUE(B1:C10, FAUX(), VRAI())}, avec Unicité comme VRAI. Renvoie la matrice ci-dessous avec les lignes d'Andy, Harry, Eva et Irène omises car leurs notes et âges combinés ne sont pas uniques.

Grade

Age

4

10

3

10

5

11

2

7

1

7


Informations techniques

tip

Cette fonction est disponible depuis LibreOffice 24.8.


Cette fonction ne fait pas partie de Open Document Format for Office Applications (OpenDocument) Version 1.3. Partie 4 : Norme de format de formule recalculée (OpenFormula). L'espace de nom est

COM.MICROSOFT.UNIQUE