字典去重

Sub quchong()
Dim dic As Object
Set dic = CreateObject("scripting.dictionary")
For i = 1 To 91
If Not dic.exists(Cells(i, 1).Value) Then
dic.Add Cells(i, 1).Value, Nothing
End If
Next
[b1].Resize(dic.Count, 1) = WorksheetFunction.Transpose(dic.keys)
[c1] = Join(dic.keys, ",")
End Sub

  

posted on 2020-03-17 11:20  lizicheng  阅读(319)  评论(0编辑  收藏  举报

导航