我正在尝试根据列A中填充的行数将VBA写入自动填充列H到K.我还需要在每次运行宏时从不同的行开始。 Alos注意我的工作表没有命名为sheet1或sheet2(我不知道这是否有所不同)
到目前为止我没有任何作品。
Sub Macro1
Dim x As Long
Dim i As Long
x = Range("A" & Rows.count).End(3)(1).row
For i = 8 To 11
Cells(2, i).AutoFill Range(Cells(2, i), Cells(x, i)), xlFillDefault
Next i
End Sub
这不起作用。它不会自动填充任何列。