|
发表于 2015-1-7 22:13
|
显示全部楼层
本楼为最佳答案
- Sub ttt()
- Dim arr, brr, rw&, tem, i&, k&
- arr = [a4].CurrentRegion
- For i = 1 To UBound(arr)
- brr = Application.Index(arr, i, 0)
- For x = 1 To UBound(brr)
- For y = x + 1 To UBound(brr)
- If brr(x) < brr(y) Then
- temp = brr(x)
- brr(x) = brr(y)
- brr(y) = temp
- End If
- Next y
- Next x
- Cells(i + 3, "h").Resize(1, 6) = brr
- Next
- End Sub
复制代码 |
|