排名.rar
(41.19 KB, 下载次数: 11)
已做好,请测试。
- Sub test()
- Dim Arr
- Dim m%, i%, j%, n%
- m = [F65536].End(xlUp).Row
- Arr = Range("F4:H" & m)
- j = 4
- For i = 1 To UBound(Arr, 1)
- If Arr(i, 3) = 3 Then
- Cells(j, "x") = Arr(i, 1)
- Cells(j, 25) = Arr(i, 2)
- Cells(j, 26) = Arr(i, 3)
- j = j + 1
- End If
- Next
- n = [x65536].End(xlUp).Row + 1
- For i = 1 To UBound(Arr, 1)
- If Arr(i, 3) = 4 Then
- Cells(n, "x") = Arr(i, 1)
- Cells(n, 25) = Arr(i, 2)
- Cells(n, 26) = Arr(i, 3)
- n = n + 1
- End If
- Next
- n = [x65536].End(xlUp).Row + 1
- For i = 1 To UBound(Arr, 1)
- If Arr(i, 3) = 9 Then
- Cells(n, "x") = Arr(i, 1)
- Cells(n, 25) = Arr(i, 2)
- Cells(n, 26) = Arr(i, 3)
- n = n + 1
- End If
- Next
- End Sub
复制代码
|