I have been using this line of code to filter a column of data(Contents of B), find the unique values, and paste them to a row far to the right(BB), where last is the end row in the range. Maybe you can leverage it.

Sheets(sht).range("B1:B" & last).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=range("BB1"), Unique:=True