|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
参与一下。。。- Sub ykcbf() '//2024.1.4
- Application.ScreenUpdating = False
- With Sheets("WX903-1X-1206")
- arr = .UsedRange
- dd = .[b1]
- End With
- ReDim brr(1 To 10000, 1 To 9)
- For j = 6 To UBound(arr, 2)
- If arr(3, j) <> Empty Then
- For i = 3 To UBound(arr)
- If arr(i, 2) <> Empty Then
- If arr(i, j) <> Empty Then
- m = m + 1
- brr(m, 1) = arr(3, j)
- brr(m, 2) = arr(i, 1)
- brr(m, 3) = arr(i, 2)
- brr(m, 4) = dd
- brr(m, 5) = arr(i, 3)
- brr(m, 6) = arr(i, j)
- brr(m, 7) = arr(i, 4)
- brr(m, 8) = arr(i, 5)
- brr(m, 9) = Val(brr(m, 7)) * Val(brr(m, 6))
- End If
- End If
- Next
- End If
- Next
- With Sheets("产量表")
- .UsedRange.Offset(1) = ""
- .Columns(1).NumberFormatLocal = "mm/dd"
- .Columns(6).NumberFormatLocal = "0"
- .Columns("G:I").NumberFormatLocal = "0.00"
- .[a2].Resize(m, 9) = brr
- .[a2].Resize(m, 9).Sort .[a2], 1
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
评分
-
1
查看全部评分
-
|