Forum Discussion
ML_PT
Jul 20, 2021Copper Contributor
Copy cells to Last Row, Paste to another sheet to Last Row (1rst EMPTY ROW, adding, not replacing)
Copy cells to Last Row, Paste to another sheet to Last Row (FIRST EMPTY ROW, adding, not replacing) Hello friends. Im New in VBA. Could you help me on this? So, i have 5 Cells D8:H8 wi...
- Jul 20, 2021
Hi, I use something similar in my day to day work. This should work for your purposes, this functions assuming you have headers on sheet 2.
Sub Transfer() LastRow = [Sheet2].Cells(Rows.Count, 1).End(xlUp).Row NextRowExport = LastRow + 1 [Sheet1].Range("D8:H8").Copy [Sheet2].Range("A" & NextRowExport).PasteSpecial xlPasteValues End Sub
DKoontz
Jul 20, 2021Iron Contributor
Hi, I use something similar in my day to day work. This should work for your purposes, this functions assuming you have headers on sheet 2.
Sub Transfer()
LastRow = [Sheet2].Cells(Rows.Count, 1).End(xlUp).Row
NextRowExport = LastRow + 1
[Sheet1].Range("D8:H8").Copy
[Sheet2].Range("A" & NextRowExport).PasteSpecial xlPasteValues
End Sub
- ML_PTJul 20, 2021Copper ContributorHi DKoontz,
First of all thank you for your help.
I tried your propose but receive an Run-time error 424.
Thanks for you Help