Hi,
I really know nothing about vba so here goes. I would like to enter data in a row with 4 cells of info. then hit enter and return to the first cell and move the row down. all four cells must have data entered. and all four must move down. i tried some code as below i found and i modified but it did not work as expected. this moved the row down when returning the cursor to A2. It also should not copy the data style of the top row. Whats the best way to do this ?? Any help would be appreciated. post corrected i think. cheers
cheers Mark
![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False If [E2] <> "" Then [E2].Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove [E2].Select End If Application.EnableEvents = True If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False If [D2] <> "" Then [D2].Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove [D2].Select End If Application.EnableEvents = True If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False If [C2] <> "" Then [C2].Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove [C2].Select End If Application.EnableEvents = True If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False If [B2] <> "" Then [B2].Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove [B2].Select End If Application.EnableEvents = True If Target.Column <> 1 Then Exit Sub Application.EnableEvents = False If [A2] <> "" Then [A2].Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove [A2].Select End If Application.EnableEvents = True End Sub











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks