how do i insert row automatically after hitting enter at the end of data entry?
A Ali Nov 11, 2004 #1 how do i insert row automatically after hitting enter at the end of data entry?
D Don Guillett Nov 11, 2004 #2 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 Click to expand... entry?
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 Click to expand... entry?
D Dave Peterson Nov 12, 2004 #3 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
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 Nov 12, 2004 #4 or Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 Then Rows(Target.Row + 1).Insert End Sub
or Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 Then Rows(Target.Row + 1).Insert End Sub