B
belvy123
Hi All
I have a sheet that I use the following script to move info on a new entry.
It was written by Bob Phillips
I want to be able to use this script and add to it to do the following.
I want to enter a date in B6 and then in C6 enter a Number for a part. When
I hit enter after entering the number in C6 I want to have the script move
the info in both B6 and C6 down 1 Row each time a new entry is made.
Thanks for the help
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String=
"B6,B15,B24,B33,E6,E15,E24,E33,H6,H15,H24,H33,K6,K15,K24,K33,N6,N15,N24,N33,Q6,Q15,Q24,Q33" '<== change to suit
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Resize(4).Copy .Offset(1, 0)
.Value = ""
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
I have a sheet that I use the following script to move info on a new entry.
It was written by Bob Phillips
I want to be able to use this script and add to it to do the following.
I want to enter a date in B6 and then in C6 enter a Number for a part. When
I hit enter after entering the number in C6 I want to have the script move
the info in both B6 and C6 down 1 Row each time a new entry is made.
Thanks for the help
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String=
"B6,B15,B24,B33,E6,E15,E24,E33,H6,H15,H24,H33,K6,K15,K24,K33,N6,N15,N24,N33,Q6,Q15,Q24,Q33" '<== change to suit
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Resize(4).Copy .Offset(1, 0)
.Value = ""
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub