字典去重
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