UNIQUE

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

แƒกแƒ˜แƒœแƒขแƒแƒฅแƒกแƒ˜

UNIQUE(Array [; By col [; Uniqueness] ])

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.


แƒ›แƒแƒ’แƒแƒšแƒ˜แƒ—แƒ”แƒ‘แƒ˜

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

A

B

C

D

E

1

แƒกแƒแƒฎแƒ”แƒšแƒ˜

แƒ™แƒšแƒแƒกแƒ˜

แƒแƒกแƒแƒ™แƒ˜

แƒ“แƒแƒจแƒแƒ แƒ”แƒ‘แƒ

แƒฌแƒแƒœแƒ

2

แƒ”แƒœแƒ“แƒ˜

3

9

150

40

3

แƒ‘แƒ”แƒขแƒ˜

4

10

1000

42

4

แƒ™แƒแƒ แƒšแƒ

3

10

300

51

5

แƒ“แƒแƒœแƒ˜แƒ”แƒšแƒ˜

5

11

1200

48

6

แƒ”แƒ•แƒ

2

8

650

33

7

แƒคแƒ แƒ”แƒœแƒ™แƒ˜

2

7

300

42

8

แƒ’แƒ แƒ”แƒขแƒ

1

7

200

36

9

แƒฐแƒแƒ แƒ˜

3

9

1200

44

10

แƒ˜แƒ แƒ˜แƒœแƒ

2

8

1000

42

11


Example 1

{=UNIQUE(B1:C10; FALSE(); FALSE())} returns the array below. The grades and ages of the rows with name Andy and Harry are returned only once. The same for rows with name Eva and Irene.

แƒ™แƒšแƒแƒกแƒ˜

แƒแƒกแƒแƒ™แƒ˜

3

9

4

10

3

10

5

11

2

8

2

7

1

7


Example 2

{=UNIQUE(B1:C10; FALSE(); TRUE())}, with Uniqueness as TRUE. Returns the array below with the rows of Andy, Harry, Eva and Irene omitted because their combined grades and ages are not unique.

แƒ™แƒšแƒแƒกแƒ˜

แƒแƒกแƒแƒ™แƒ˜

4

10

3

10

5

11

2

7

1

7


Technical information

tip

This function is available since LibreOffice 24.8.


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

Please support us!