|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub test()
Dim arr, brr
With Sheets("数据")
.Rows("1:1").Delete Shift:=xlUp
arr = .UsedRange
End With
'每行单独写入数组BRR
With Sheets("模板")
brr = .Range("A1:B9")
For i = 2 To UBound(arr, 1)
brr(1, 2) = arr(i, 1)
brr(2, 2) = arr(i, 2)
brr(3, 2) = arr(i, 3)
brr(4, 2) = arr(i, 13)
brr(5, 2) = arr(i, 14)
brr(6, 2) = arr(i, 9)
brr(7, 2) = arr(i, 7)
brr(8, 2) = arr(i, 6)
brr(9, 2) = arr(i, 8)
'.Cells(10 * (i - 2) + 1, 1).Select
.Cells(10 * (i - 2) + 1, 1).Resize(9, 2) = brr
Next
End With
End Sub |
评分
-
1
查看全部评分
-
|