|
- Sub t()
- Dim arr, i%, j%, k%, p%
- j = 0: k = 1
- For i = 3 To [a65536].End(3).Row
- If Range("n" & i) <= 3 And Range("o" & i) > 75 Then
- j = j + 1
- End If
- Next
- p = 75 - j
- ReDim arr(1 To p + 15, 1 To 3)
- For j = 1 To 5
- For i = 3 To [a65536].End(3).Row
- If Range("o" & i) = j Then
- arr(k, 1) = "一等奖"
- arr(k, 2) = Range("b" & i)
- arr(k, 3) = Range("c" & i)
- k = k + 1
- End If
- Next i, j
- For j = 6 To 15
- For i = 3 To [a65536].End(3).Row
- If Range("o" & i) = j Then
- arr(k, 1) = "二等奖"
- arr(k, 2) = Range("b" & i)
- arr(k, 3) = Range("c" & i)
- k = k + 1
- End If
- Next i, j
- For j = 16 To p + 15
- For i = 3 To [a65536].End(3).Row
- If Range("o" & i) = j Then
- arr(k, 1) = "三等奖"
- arr(k, 2) = Range("b" & i)
- arr(k, 3) = Range("c" & i)
- k = k + 1
- End If
- Next i, j
- Sheet2.Activate
- Sheet2.[a3].Resize(p + 15, 3) = arr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|