The objective of the code is to copy a n number of rows and three columns of cells from Sheet2 into the last empty row in Sheet1. I attempted using cell properties in the range to copy but this line is giving me a Runtime error '1004' (Application-defined or object-defined error).
How can this be rectified?
Private Sub CommandButton1_Click()
Dim sum As Integer
n = 7
Sheets("Sheet2").Range(Cells(11, 15), Cells((11 + n), 18)).Copy
With Sheets("Sheet1").Range("A500").End(xlUp).Offset(1, 0)
.PasteSpecial xlPasteFormats
.PasteSpecial xlPasteValues
End With
End Sub