回復 7#wang077Dim crr
Dim i As Long
Set D = CreateObject("Scripting.Dictionary")
With Sheets("Sheet1")
.Activate
For Each a In .Range("A2", .[a2].End(xlDown)) '把[a2]改成[a1000]或者是[a2000] 格數可以自行設定
D(a.Value) = ""
Next
End With
crr = D.keys
'================================================================排序
For i = 0 To UBound(crr) - 1
k = i
For j = i + 1 To UBound(crr)
If crr(k) > crr(j) Then k = j '升序排列用">",降序排列用"<"
Next
If k > i Then
X = crr(i)
crr(i) = crr(k)
crr(k) = X
End If
Next