I have this code below that works well if i want the beginning of my cell to always start with "BCN" and to only put the prefix if i have something entered in the cell. But hat if my i dont always need it to say "BCN" most of the time it will. If i was to type "EX" i would like it to not put "BCN" in front of it. I would appreciate any help on this.
Private Sub Worksheet_Change(ByVal Target As Excel.Range) Const prefix As String = "BCN" If Target.Column = 10 Then Application.EnableEvents = False If Target.Value <> "" Then Target.Value = prefix & Target.Value Application.EnableEvents = True End If