Forum Discussion

ML_PT's avatar
ML_PT
Copper Contributor
Jul 20, 2021
Solved

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...
  • DKoontz's avatar
    Jul 20, 2021

    ML_PT 

    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

     

Resources