Option Explicit
Sub 宏1()
Dim arr, i, d
arr = Range(Cells(1, 2), Cells(Rows.Count, 2).End(xlUp)) '获取第二列有效数据
Set d = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(arr)
d(Trim(arr(i, 1))) = True
Next i
'唯一值存入第三列
Range("c1").Resize(d.Count, 1) = WorksheetFunction.Transpose(d.Keys)
End Sub