|
参与一下。。。
- Sub ykcbf() '//2024.5.14
- With Sheets("输入")
- arr = .[a1:ad64].Value
- rq = .[g2].Value
- bc = .[w2].Value
- End With
- ReDim brr(1 To 1000, 1 To 7)
- For i = 5 To UBound(arr)
- If arr(i, 3) <> Empty Then
- For j = 7 To UBound(arr, 2) Step 3
- If arr(i, j) <> Empty Then
- m = m + 1
- brr(m, 1) = rq
- brr(m, 2) = bc
- brr(m, 3) = arr(i, 3)
- brr(m, 4) = arr(3, j)
- brr(m, 5) = arr(i, j)
- brr(m, 6) = arr(i, j + 1)
- brr(m, 7) = arr(i, j + 2)
- End If
- Next
- End If
- Next
- With Sheets("数据汇总")
- r = .Cells(Rows.Count, 2).End(3).Row
- .Cells(r + 1, 2).Resize(m, 7) = brr
- End With
- MsgBox "OK!"
- End Sub
复制代码
|
|