我可以复制整行,但发现很难定位第N行的结束单元格,然后将从第N2行到最后一行的所有内容复制。第N行的结束(单元格)的长度会随着导入数据的更改而更改
Sub Copy_To_Lastrow()
Application.ScreenUpdating = False
Dim Lastrow As Long
Sheets("Meeting1").Select
Range("N2").Select
Lastrow = Cells(Rows.Count, "AN").End(xlUp) + 1
Range("n2").Copy Cells(Lastrow, "AN")
'Lastrow = Cells(Rows.Count, "AN").End(xlUp).Row + 1
'Range("n2").Copy Cells(Lastrow, "AE")
'Lastrow.PasteSpecial xlPasteValues
Range(Lastrow).PasteSpecial.Values
Application.ScreenUpdating = True
End Sub
1条答案
按热度按时间z9smfwbn1#
一种方法,避免任何复制/粘贴: