我想用代码执行字幕任务
Sub COPYTOLASTROW()
Dim LRDest As Long, SrcRng As Range
With Sheets("source")
Set SrcRng = .Range("B16:E20")
End With
With Sheets("summary")
LRDest = .Cells(.Rows.Count, 1).End(xlUp).Row
SrcRng.Copy .Cells(LRDest + 1, 1)
End With
End Sub
上面的代码基于线程Copy data from one sheet to the last row of another sheet。
但是,我只想将VALUES粘贴到目的地。我应该对上面的代码做什么?
答案 0 :(得分:0)
替换:
SrcRng.Copy .Cells(LRDest + 1, 1)
具有:
SrcRng.Copy
.Range("A" & LRDest + 1).PasteSpecial paste:= xlPasteValues
Application.CutCopyMode = False