
If Not Intersect(Target, Range("D3:D24,H3:H24")) Is Nothing And IsEmpty(Cells(Target.Row, 2)) = False Then
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
End If
If Not Intersect(Target, Range("D3:D24,H3:H24")) Is Nothing And IsEmpty(Cells(Target.Row, 2)) = True Then
Application.EnableEvents = False
Target.ClearContents
Application.EnableEvents = True
End If
End Sub