Macro to copy and paste in next blank cell

2019-06-11 14:19发布

Sub test1()
Dim LR As Long
LR = WorksheetFunction.Max(20, Range("C" & Rows.Count).End(xlUp).Row + 1)
Range("C3").Resize(, 3).Cut Destination:=Range("C" & LR)
End Sub

The above source code works to copy(cut) paste into same sheet. Now i need cut and paste into another sheet ie: Sheet1(Cut) to sheet2(Past)

Thanks

1条回答
We Are One
2楼-- · 2019-06-11 15:04

Below code will cut data from sheet1 to sheet2

Sub test1()
Dim LR As Long
LR = WorksheetFunction.Max(20, Range("C" & Rows.Count).End(xlUp).Row + 1)
Sheets("Sheet1").Range("C3").Resize(, 3).Cut 
Sheets("Sheet2").Range("C" & LR).PasteSpecial xlPasteValues
End Sub
查看更多
登录 后发表回答