Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try this:
Private Sub Worksheet_Change(ByVal Target As Range) Dim NewValue As String If Target.Column = 1 Then Select Case Target.Text Case Is = "005", "5" NewValue = "AAA" Case Is = "102" NewValue = "BBB" Case Is = "109" NewValue = "CCC" Case Is = "112" NewValue = "DDD" Case Is = "641" NewValue = "EEE" Case Is = "2090" NewValue = "FFF" End Select Target.Offset(0, 1) = NewValue End If End Sub This assumes that you want the Triple letters to occurr right next to your exixting numbers. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
SUMIF statement with AND statement | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |