Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim flag As Boolean
If Target.Count > 1 Then Exit Sub
Application.EnableEvents = False
If Not Intersect(Target, Range("E3:E62")) Is Nothing Then
Target.Value = StrConv(Target, vbProperCase)
If IsEmpty(Target) Then
Target.Offset(0, -1).Resize(, 6).ClearContents
End If
ElseIf Not Intersect(Target, Range("D3:D62")) Is Nothing Then
flag = True
Target.Value = Evaluate("PROPER(""" + Target.Value + """)")
Target.Value = UCase(Target.Value)
End If
Application.EnableEvents = True
End Sub