Returns unique rows in the provided source range, discarding duplicates. Rows are returned in the order in which they first appear in the source range.

Parts of a UNIQUE function

UNIQUE(range, by_column, exactly_once)

PartDescription
rangeThe data to filter by unique entries.
by_columnWhether to filter the data by columns or by rows. By default, this is false.
exactly_onceWhether to return only entries with no duplicates. By default, this is false.

Notes

  • If rows are returned which appear to be duplicates, ensure that cells including text do not have differing hidden text such as trailing spaces.
  • Ensure that numeric values are formatted in the same way - percentages as percentages, currency values as currency values, etc.

Examples

Color 1Color 2Color 3
RedYellowRed
BlueMagentaBlue
RedYellowRed
GreenWhiteGreen
Formula=UNIQUE(B2:D5)
OutputRedYellowRed
BlueMagentaBlue
GreenWhiteGreen
Formula=UNIQUE(B2:D5, TRUE)
OutputRedYellow
BlueMagenta
RedYellow
GreenWhite
Formula=UNIQUE(B2:D5, TRUE)
OutputBlueMagentaBlue
GreenWhiteGreen