|
- Sub test()
- Dim r%, i%
- Dim arr, brr
- Dim d As Object
- Set d = CreateObject("scripting.dictionary")
- With Worksheets("sheet1")
- r = .Cells(.Rows.Count, 1).End(xlUp).Row
- arr = .Range("a2:k" & r)
- For i = 1 To UBound(arr)
- d.RemoveAll
- For j = 1 To UBound(arr, 2)
- d(arr(i, j)) = ""
- Next
- brr = d.keys
- For x = 0 To UBound(brr) - 1
- p = x
- For y = x + 1 To UBound(brr)
- If brr(p) > brr(y) Then
- p = y
- End If
- Next
- If p <> x Then
- temp = brr(x)
- brr(x) = brr(p)
- brr(p) = temp
- End If
- Next
- .Cells(i + 1, 14).Resize(1, UBound(brr) + 1) = brr
- Next
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|