I need to count unique values in range (C2:C2080) in excel. Googled formula:
=SUM(IF(FREQUENCY(MATCH(C2:C2080;C2:C2080;0);MATCH(C2:C280;C2:C2080;0))>0;1))
JustinG's function works very well (and fast) until the number of unique items exceeds 32,767 due to some type of limit in Excel.
I found if you modify his code
Public Function CountUnique(rng As Range) As Integer
and make it as...
Public Function CountUnique(rng As Range) As Long
It will then handle more unique items.