Sub 去重复值()
On Error GoTo 100
Dim d As Object, cf
Set d = CreateObject("scripting.dictionary")
qy = Application.InputBox("", "选择数据区域", , , , , , 8)
For Each cf In qy
d(cf) = ""
Next
Set ff = Application.InputBox("", "要放置的区域", , , , , , 8)
ff.Resize(d.Count) = Application.Transpose(d.keys)
100:
End Sub
|