Automatically adds a row

  • Thread starter Thread starter Tkaklita
  • Start date Start date
T

Tkaklita

Is it possible to create a program that will automatically add a row above
the row you are entering information on so that each row of info keeps moving
downwards?
 
Right click the sheet tab>View code and Paste the below code...and try
entering values in Column A...Adjust to suit...Try and feedback

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A:A")) Is Nothing Then
Rows(Target.Row).Insert: Target.Offset(-1, 0).Select
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
 
This works fantastic!!! Thank you very much.

Jacob Skaria said:
Right click the sheet tab>View code and Paste the below code...and try
entering values in Column A...Adjust to suit...Try and feedback

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A:A")) Is Nothing Then
Rows(Target.Row).Insert: Target.Offset(-1, 0).Select
End If
Application.EnableEvents = True
End Sub

If this post helps click Yes
 
This was fabulous, thank you so much for posting it.

Can anyone guide me on what would need to be added to the code to retain the
formatting (merged cells) and the formulas in some of the cells (If, thens)

What a great community this is!
 
Back
Top