我正在尝试使用宏自动填充,但它不起作用...将仅填充H2和I2单元格,其余均为空白。我的代码有什么问题?
Sub company()
Dim LastRow As Long
With Sheets("Combined")
LastRow = .Cells(Rows.Count, "H").End(xlUp).Row
.Range("H2:H" & LastRow).Value = 0
LastRow = .Cells(Rows.Count, "I").End(xlUp).Row
.Range("I2:I" & LastRow).Value = 1
End With
End Sub