Sub TEST()
Dim Arr, xD, i&, T$
Set xD = CreateObject("Scripting.Dictionary")
Arr = [E2:E28]
For i = 1 To UBound(Arr)
T = Arr(i, 1)
If T <> "" And xD.Exists(T) = False Then xD(T) = ""
101: Next i
[E30].Resize(xD.Count) = Application.Transpose(xD.keys)
End Sub作者: zamamilo 時間: 2020-3-30 11:00
回復 3#zamamilo
Sub TEST()
Dim Arr, xD, i&, T$
Set xD = CreateObject("Scripting.Dictionary")
Arr = Range("索引區")
For i = 1 To UBound(Arr)
T = Arr(i, 1)
If T <> "" And xD.Exists(T) = False Then xD(T) = ""
101: Next i
Range("排序區").Resize(xD.Count) = Application.Transpose(xD.keys)
End Sub作者: zamamilo 時間: 2020-3-31 17:46