Below is code from a Microsoft site that creates new rows each time it sees a number eg. if the number is 12 it will generate an additional 11 rows. Everything works great but I need to add the number 1 to each cell in column E when it creates each new row. If the number is 1 it will populate to 2 and then to 3 etc. How can this be modified to accomplish this?
Code:
Public Sub InsBelow()
Dim lngStartRow As Long
Dim lngEndRow As Long
Dim m As Integer
Dim n As Long
With ActiveSheet
lngStartRow = Range("F" & CStr(Application.Rows.Count)).End(xlUp).Row
lngEndRow = 1
For n = lngStartRow To lngEndRow Step -1
If IsNumeric(Range("F" & CStr(n)).Value) And Range("F" & CStr(n)).Value <> "" Then
Rows(n + 1).Resize(Range("F" & n).Value - 1).Insert
Rows(n).Resize(Range("F" & n).Value).FillDown
End If
Next n
End With
End Sub