If I want to select an entire row in a macro I would use
Rows(“2:2”).Select
In my example below the Rows statement isn’t working (syntax error), how would I use variables to select a row. I’m trying to find the last row on one page and then find the last row on the next page and I want to insert whatever the difference in the number of rows is.
Private Sub InsertRows()
Dim LastRowProd As Long
Dim LastRowDaily As Long
Dim NewRow As Long
Sheets(“PRODUCTION”).Select
LastRowProd = Range(“A65536”).End(xlUp).Row
Sheets(“Daily Report”).Select
LastRowDaily = Range(“A65536”).End(xlUp).Row
NewRow = LastRowDaily + 1
Rows(LastRowDaily:LastRowDaily).Select
Selection.Copy
Rows(NewRow:LastRowProd).Select
Selection.Insert Shift:=xlDown
End Sub