Pages

21 Jun 2013

VBA Code for Insert Row

Sub InsRow()
Dim lastrow As Long, r As Long
lastrow = ActiveSheet.UsedRange.Rows.Count
For r = lastrow To 3 Step -1
If Cells(r, 1).Value <> "" Then Rows(r).Insert
Next r
End Sub

No comments:

Post a Comment