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_PT
Jul 20, 2021Copper Contributor
Hi DKoontz,
First of all thank you for your help.
I tried your propose but receive an Run-time error 424.
Thanks for you Help
First of all thank you for your help.
I tried your propose but receive an Run-time error 424.
Thanks for you Help
- DKoontzJul 20, 2021Iron ContributorYou may have to change the sheet names to match your file. What line is highlighted when the error pops up?
- ML_PTJul 21, 2021Copper ContributorHi Dkoontz,
Thank you very much my Friend.
Problem Solve
🙂- DKoontzJul 21, 2021Iron ContributorGreat! Glad that worked.
- ML_PTJul 20, 2021Copper ContributorI already change the sheet names.
Te line that pop ups is this:
LastRow = [REGISTO MORADOR].Cells(Rows.Count, 1).End(xlUp).Row