Hi,
Could someone take a look at this.
I created this Event Handler to add "-" in the middle of a 6 digit string...
e.g aaabbb will format as AAA-BBB.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Column
Case 9
Routing = Target.Value
Select Case Len(Routing)
Case 6
NewRouting = UCase(Left(Routing, 3) & "-" & Right(Routing, 3))
End Select
Target.Value = NewRouting
End Select
End Sub
Problem is, after typing data into the cell and hitting enter, I then have reselect the cell fot the macro to run.
Any ideas?
Thanks!
Could someone take a look at this.
I created this Event Handler to add "-" in the middle of a 6 digit string...
e.g aaabbb will format as AAA-BBB.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Column
Case 9
Routing = Target.Value
Select Case Len(Routing)
Case 6
NewRouting = UCase(Left(Routing, 3) & "-" & Right(Routing, 3))
End Select
Target.Value = NewRouting
End Select
End Sub
Problem is, after typing data into the cell and hitting enter, I then have reselect the cell fot the macro to run.
Any ideas?
Thanks!