|
- Private Sub CommandButton1_Click()
- 'wzq 2023.7.17
- Dim arr, i&, r&, brr, n&, j%
- Sheet1.Activate
- [F4:AI10000].ClearContents
- [F4:AI10000].NumberFormatLocal = "@"
- r = Cells(Rows.Count, 4).End(xlUp).Row
- arr = Range("C4:E" & r)
- ReDim brr(1 To UBound(arr), 1 To 30)
- For i = 1 To UBound(arr)
- For j = 1 To 3
- s = arr(i, j) + j * 10 - 9
- brr(i, s) = Cells(3, 5 + s)
- Next
- Next
- For j = 1 To 30
- n = 0
- For i = 1 To UBound(arr)
- If brr(i, j) = "" Then
- If i = 1 Then n = 1 Else n = n + 1
- brr(i, j) = n
- Else
- n = 0
- End If
- Next
- Next
- Sheet1.[F4].Resize(UBound(brr), 30) = brr
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|