View Single Post
  #3   Report Post  
Dave O
 
Posts: n/a
Default

Alternatively, since the report varies in length, you could enter the
word "stop" below the last row of the report and run that follows.
That will avoid the step of amending the code each time you run the
report.

Sub InsertRow()
Range("a1").Select
Do Until ActiveCell.Value = "stop"
If ActiveCell.Value = "TOTAL EXPENSES" Then
Selection.EntireRow.Insert
ActiveCell.Offset(1, 0).Select
End If

ActiveCell.Offset(1, 0).Select
Loop

End Sub