Help Needed?

D

Don Guillett

right click on sheet tab>view code>insert this>save.
Now, when you enter anything in column F (6) a row will be inserted

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 Then Target.EntireRow.Insert
End Sub


--
Don Guillett
SalesAid Software
[email protected]
Ali said:
how do i insert row automatically after hitting enter at the end of data
entry?
 
D

Dave Peterson

And another version based on Don's:

Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 Then
Target(1).Offset(1, 0).EntireRow.Insert
End If
End Sub

This inserts after the cell you changed
 
D

Don Guillett

or
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 6 Then Rows(Target.Row + 1).Insert
End Sub
 
Top