I'm using the below VBA code which is copying a range from Sheet1 and paste it in the same sheet. However i need to paste the data in the next available row of sheet2.
Private Sub CommandButton1_Click()
Sheets("Sheet1").Range("A1:A5").Copy
Dim lastrow As Long
lastrow = Range("A65536").End(xlUp).Row
Sheets("Sheet2").Activate
Cells(lastrow + 1, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End Sub
Please help me out..