我想将一个单元格的值粘贴到表第10列的每个单元格中。但是,我只希望它对填充的行这样做。添加这些代码行后,宏将无休止地运行。
Worksheets("Inspections").Activate
With Worksheets("Inspections")
rowq = .Range("A" & .Rows.Count).End(xlUp).row
Range(.Cells(3, 10), .Cells(rowq, 10)).Value = Range("L1").Value
End With
我使用此代码解决了该问题。仍然不确定为什么原图不起作用。
With Worksheets("Inspections")
rowq = Cells.Find(What:="*", _
After:=Range("A1"), _
LookAt:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).row
Range(.Cells(3, 10), .Cells(rowq, 10)).Value = Range("L1").Value
End With