- SpreadJS Overview
- Getting Started
- JavaScript Frameworks
- Best Practices
- Features
- SpreadJS Designer
- SpreadJS Designer Component
- SpreadJS Collaboration Server
- Touch Support
-
Formula Reference
- Formula Overview
-
Formula Functions
- Barcode Functions
- Compatibility Functions
- Database Functions
- Date and Time Functions
- Engineering Functions
- Financial Functions
- Information Functions
- Logical Functions
- Lookup and Reference Functions
- Math and Trigonometric Functions
- Statistical Functions
- Sparkline Functions
- Text Functions
- Web Functions
- RegEx Functions
- Other Functions
- Import and Export Reference
- Frequently Used Events
- API Documentation
- Release Notes
UNIQUE
This function returns a list of all the unique values in a cell range.
type=note
UNIQUE is a dynamic array formula, and you need to enable the dynamic array feature in the Workbook.
Syntax
UNIQUE(array, [by_col], [occurs_once])
Arguments
UNIQUE function has the following arguments:
Argument | Description |
|---|---|
array | [required] Specifies the range or array from which you want to return unique values. |
by_col | [optional] Specifies the logical value that indicates how to compare. If this argument is TRUE, it refers to "by column" and if FALSE, it refers to the "by row". |
occurs_once | [optional] Specifies a logical value. If this argument is TRUE, it will return unique values that occur only once. In case the value is FALSE, all the unique values will be included in the result. |
Data Types
Accepts a range or array. Returns a list of unique values.
Examples
For instance - The cell C4 in the following image contains the formula =UNIQUE(A4:A15) and returns only the unique customer names from the values in cell range A4 to A15. Based on the number of unique values, the dynamic array formula spills to the cell range C5 to C8 automatically.
Data Types
This function is available in SpreadJS 13.0 or later.