UNIQUE scans the array argument and returns one instance of each distinct value in the order they first appear, spilling results into adjacent empty cells. The spill range expands or contracts as the number of unique values changes. Two entries are considered duplicates only when all compared columns match exactly -- for a single-column range this is straightforward; for multi-column ranges entire rows must be identical to be considered duplicates. Text matching is case-insensitive. Wrap UNIQUE in
SORT to get a sorted unique list: =SORT(UNIQUE(A2:A100)). Wrap in COUNTA to count distinct values: =COUNTA(UNIQUE(A2:A100)). Use UNIQUE as the source range for a data validation dropdown to give users a live deduplicated list that updates automatically. For Excel 2019 and earlier where UNIQUE does not exist, the count unique values formula using SUMPRODUCT is the standard workaround.