For i = 1 To UBound(arr)
s = arr(i, 1)
If Not d.exists(s) Then
d(s) = ""
k = k + 1
brr(k, 1) = arr(i, 1)
End If
Next
Range("B:B").ClearContents
Range("B1").Value = "結果"
With Range("B2").Resize(k, 1)
.NumberFormat = "@"
.Value = brr
End With
回復 1#kim223824
底下誠如3樓 adrian_9832 所說的是用錄製的方式取得:
Sub test()
Columns("A").Copy [B1]
er = [A65536].End(3).Row
With Range("B1:B" & er)
.RemoveDuplicates Columns:=1, Header:=xlNo
.Sort key1:=[B1], Order1:=1
End With
End Sub作者: kim223824 時間: 2017-11-26 15:46