我是一个刚学VB的菜鸟,请问在EXCEL中给2到37列重复插入第1列如何编写代码?

2024-11-28 15:56:40
推荐回答(1个)
回答(1):

Private Sub CommandButton1_Click()
For r = 1 To a ' a为您想要插入的行总数
For c = 2 To 37
Sheet1.Cells(r, c) = sheet1.cells(r,1)

Next
Next
End Sub