|
参与一下。。。- Sub ykcbf() '//2024.8.12
- Application.ScreenUpdating = False
- Dim tm: tm = Timer
- With Sheets("台账")
- r = .Cells(Rows.Count, 2).End(3).Row
- arr = .[a1].Resize(r, 12)
- End With
- ReDim brr(1 To 10000, 1 To 12)
- For i = 2 To UBound(arr)
- If arr(i, 3) <> Empty Then
- num = arr(i, 12) / 2
- m = m + 2
- For j = 1 To UBound(arr, 2) - 1
- brr(m - 1, j) = arr(i, j)
- brr(m, j) = arr(i, j)
- Next
- brr(m - 1, 12) = num
- brr(m, 12) = num
- End If
- Next
- With Sheets("结果")
- .UsedRange.Offset(1).ClearContents
- .[a2].Resize(m, 12) = brr
- End With
- Application.ScreenUpdating = True
- MsgBox "共用时:" & Format(Timer - tm) & "秒!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|