[英]copy till last row from specific row number with cell reference
I have the below code where I need to make it work as below.我有下面的代码,我需要让它按如下方式工作。
any suggestions from SO team? SO团队有什么建议吗?
wbSource.Sheets(SITE_TEMPLATE).Rows(10).EntireRow.Copy wbMaster.Sheets(SITE_TEMPLATE).Range("A" & insertRow2)
insertRow2 = insertRow2 + 1
Try this:尝试这个:
Sub test()
Dim LastRow As Long
With Workbooks("wbSource").Worksheets("SITE_TEMPLATE")
LastRow = .Cells(.Rows.Count, "N").End(xlUp).Row
.Rows(10 & ":" & LastRow).EntireRow.Copy wbMaster.Sheets(SITE_TEMPLATE).Range("A" & insertRow2)
insertRow2 = insertRow2 + 1
End With
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.