I'm trying to copy the last row in one sheet (at a variable location) to the last row of data (at a variable location) in another sheet. So far I have tried This solution and This solution. They both copied a bunch of rows instead of the exact last row in the initial spreadsheet (WWData).
Sub copylastrow()
Dim Last_Row1 As Long
Dim Last_Row2 As Long
Last_Row1 = WWData.Cells(Rows.Count, 1).End(xlUp).Row
Last_Row2 = WWOutput.Cells(Rows.Count, 1).End(xlUp).Row + 1
WWData.Cells(Last_Row1).Copy WWOutput.Cells(Last_Row2)
End Sub
What am I doing wrong? Note: the WWData and WWOutput will have been previously defined.
Josh