Trying to find solution for simple Autofill Macro until the last row. I got error that all merged cells must need to be the same size.
Sub Button10_Click()
Sheets("P").Select
Range("P5").Select
ActiveCell.FormulaR1C1 = "5"
LastRow = Range("A65000").End(xlUp).Row
Range("P5").Select
Selection.AutoFill Destination:=Range("P5:P" & LastRow) (error row)
Sheets("Test").Select
End Sub
Maybe someone know where can be a problem?