Description
Returns a list of unique values in a list or range.
NOTES
- An array can be thought of as a row or column of values, or a combination of rows and columns of values.
- UNIQUE is one of the dynamic array functions. You may encounter Spilled Array Behavior.
Syntax
Copied!=UNIQUE(array, [by_col], [exactly_once])
INPUT DATA
| | A | B | C | D | E | F |
|:---:|:----|:----|:----|:--------|:----|:----|
| 1 | | | | | | |
|-----|-----|-----|-----|---------|-----|-----|
| 2 | | ID | | Product | | |
|-----|-----|-----|-----|---------|-----|-----|
| 3 | | 1 | | A | | |
|-----|-----|-----|-----|---------|-----|-----|
| 4 | | 1 | | A | | |
|-----|-----|-----|-----|---------|-----|-----|
| 5 | | 3 | | B | | |
|-----|-----|-----|-----|---------|-----|-----|
| 6 | | 4 | | C | | |
|-----|-----|-----|-----|---------|-----|-----|
| 7 | | | | | | |
|-----|-----|-----|-----|---------|-----|-----|
EXAMPLE 1
Copied!//𝘰𝘱𝘵𝘪𝘰𝘯𝘢𝘭: 𝘣𝘺𝘤𝘰𝘭=0, 𝘦𝘹𝘢𝘤𝘵𝘭𝘺_𝘰𝘯𝘤𝘦=0. =UNIQUE(HSTACK(B3:B6, D3:D6))
| | A | B | C | D | E |
|:---:|:----|----:|:----|:----|:----|
| 1 | | | | | |
|-----|-----|-----|-----|-----|-----|
| 2 | | | | | |
|-----|-----|-----|-----|-----|-----|
| 3 | | 1 | A | | |
|-----|-----|-----|-----|-----|-----|
| 4 | | 3 | B | | |
|-----|-----|-----|-----|-----|-----|
| 5 | | 4 | C | | |
|-----|-----|-----|-----|-----|-----|
| 6 | | | | | |