Skip to main content
Workday User Guide
Last Updated: 2023-06-23
UNIQUE2

UNIQUE2

Description

Returns a matrix whose rows are unique according to the specified keys. The function returns only unique rows, based on the values in the specified columns. This function is similar to DISTINCTROWS2(), but UNIQUE2() takes a single range and a set of columns. UNIQUE2 is case-insensitive.

Syntax

UNIQUE2(
range
,
col1
, [
col2
], ...)
  • range
    : The matrix to extract unique rows from.
  • col1
    : The name of a column to use as a key in determining whether a row is unique.
  • col2
    : The name of a column to use as a key in determining whether a row is unique.

Example

This is the original spreadsheet:
A
B
C
D
E
1
Name
Grade
2
Joe
85
3
Alice
92
4
Joe
90
The result of =UNIQUE2(A1:B4,"Name") is:
Name
Grade
Joe
85
Alice
92

Notes

  • UNIQUE2() is similar to DISTINCTROWS2(). DISTINCTROWS2() uses all the values in a row to determine whether the row is different from other rows, but UNIQUE2() uses only the values in the specified columns. UNIQUE2() filters the
    range
    so that it returns only unique rows based on the values in the specified columns. The first row it considers unique is the one it returns; it doesn't return subsequent duplicate rows.
  • This function is intended for use in array formulas.

Related Functions

DISTINCTROWS2