J
JSnow
I'm using Excel 2003 and want to move data from a cell in column C to column
D (same row) if the data starts with a six. Here's my code thus far:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo Whoops
If Target.Column = 3 Then 'column C
If Target.Row > 1 Then 'ignore row 1
Dim LResult As String
LResult = Left(Target.Value, 1)
If LResult = "6" Then
Selection.Cut
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
End If
End If
End If
Whoops:
Application.EnableEvents = True
End Sub
Nothing happens. The sheet just sits there and mocks me.
D (same row) if the data starts with a six. Here's my code thus far:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
On Error GoTo Whoops
If Target.Column = 3 Then 'column C
If Target.Row > 1 Then 'ignore row 1
Dim LResult As String
LResult = Left(Target.Value, 1)
If LResult = "6" Then
Selection.Cut
ActiveCell.Offset(0, 1).Select
ActiveSheet.Paste
End If
End If
End If
Whoops:
Application.EnableEvents = True
End Sub
Nothing happens. The sheet just sits there and mocks me.