|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
本帖最后由 robert.w 于 2021-11-30 16:55 编辑
想学习VBA,请各位高手推荐个视频课程,先行谢过
Dim i As Integer
Dim j As Integer
For j = 1 To 5
Range("e3").Select
ActiveCell.Offset(3, 8).Value = ActiveCell.Offset(0, j).Value
ActiveCell.Offset(1, j).Value = ActiveCell.Offset(4, 8).Value
ActiveCell.Offset(5, j).Value = ActiveCell.Offset(5, 8).Value
ActiveCell.Offset(9, j).Value = ActiveCell.Offset(6, 8).Value
ActiveCell.Offset(13, j).Value = ActiveCell.Offset(7, 8).Value
Next j
ActiveCell.Offset(3, 8).Value = 0
For i = 1 To 5
ActiveCell.Offset(3, 9).Value = ActiveCell.Offset(0, i).Value
ActiveCell.Offset(2, i).Value = ActiveCell.Offset(4, 8).Value
ActiveCell.Offset(6, i).Value = ActiveCell.Offset(5, 8).Value
ActiveCell.Offset(10, i).Value = ActiveCell.Offset(6, 8).Value
ActiveCell.Offset(14, i).Value = ActiveCell.Offset(7, 8).Value
Next i
ActiveCell.Offset(3, 9).Value = 0
End Sub
|
|