D
Dave F
How would I modify the following code to only apply to a range, say A1:A10?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iPos As Long
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
iPos = InStr(1, Target.Value, " ")
If iPos > 0 Then
.Value = Right(.Value, Len(.Value) - iPos) & _
" " & Left(.Value, iPos - 1)
End If
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub
(Code retrieved from:
http://groups.google.com/group/micr...f064482e88d/a5701548d16353f8#a5701548d16353f8 )
Thanks!
Dave
Private Sub Worksheet_Change(ByVal Target As Range)
Dim iPos As Long
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
If .Column = 1 Then
iPos = InStr(1, Target.Value, " ")
If iPos > 0 Then
.Value = Right(.Value, Len(.Value) - iPos) & _
" " & Left(.Value, iPos - 1)
End If
End If
End With
ws_exit:
Application.EnableEvents = True
End Sub
(Code retrieved from:
http://groups.google.com/group/micr...f064482e88d/a5701548d16353f8#a5701548d16353f8 )
Thanks!
Dave