Unique List

Vishesh's picture

Can somebody come up with a shortest possible code to get a list of unique out of a range ? Suppose you have data in Column A which contains duplicates. I want a list of uniques in column C. How is that possible with minimum of coding (but with coding only) ?

Nick's picture

unique list

how about this one liner:

    Range(Range("a1"), Cells(Rows.Count, 1).End(xlUp)).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("c1"), Unique:=True

 

Nick