Sorry, I missed the requirement for column D in your original post.
This should do what you need.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, regex As Object
Set regex = CreateObject("vbscript.regexp")
For Each c In Target
With c
If Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
If .Column = 4 And .Value <> "" Then
With regex
.Global = True
.MultiLine = True
.Pattern = "[^A-Z0-9]"
End With
.Value = "'+" & regex.Replace(.Value, "")
End If
Application.EnableEvents = True
End If
End With
Next
End Sub
Bookmarks