UNIQUE function
Values
The values to transform.
ExactlyOnce
TRUE if no values in the given array should be part of the returned array if they appear multiple times in the given array, FALSE if all values in the given array should be part of the returned array, but only once. If omitted, FALSE is assumed.
Returns
The unique values of the given array.
Returns a version of the given array with all duplicate values removed. UNIQUE({ 1, 2, 2, 3, 3, 3 })UNIQUE({ 1; 2; 2; 3; 3; 3 }) returns { 1, 2, 3 }{ 1; 2; 3 }.
If the exactlyOnce
parameter is TRUE, the returned array does
not contain any values which are duplicated in the original array. This
formula returns { 1 }{ 1 }, because 2 and 3 are
duplicated in the given array:
Examples
Returns { 1, 2, 3 }{ 1; 2; 3 }, an array in which all values of the given array appear once, in the order they were encountered.
Returns { 1 }{ 1 }, an array in which only values appear which are not duplicated in the given array.