Sub Demo1()
Dim rwsR, rwsM, x
rwsR = Sheets("Raw").Columns(1).SpecialCells(2, 1).Count
rwsM = Sheets("Main").Columns(1).SpecialCells(2, 1).Count
With Sheets("Main")
x = rwsR - rwsM
If x < 0 Then
.Rows("13:" & 12 - x).Delete
Else
.Rows("13:" & 12 + x).Insert
End If
Sheets("Raw").Cells(1, 1).CurrentRegion.Resize(, 2).Copy .Range("A12")
End With
End Sub
or generally
Sub Demo2()
Dim rwsR, rwsM, x
Dim RW As Long
rwsR = Sheets("Raw").Columns(1).SpecialCells(2, 1).Count
rwsM = Sheets("Main").Columns(1).SpecialCells(2, 1).Count
RW = Sheets("Main").Columns(1).SpecialCells(2, 1).Row
With Sheets("Main")
x = rwsR - rwsM
If x < 0 Then
.Rows(RW + 1 & ":" & RW - x).Delete
Else
.Rows(RW + 1 & ":" & RW + x).Insert
End If
Sheets("Raw").Cells(1, 1).CurrentRegion.Resize(, 2).Copy .Range("A" & RW)
End With
End Sub