Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Count > 1 Then Exit Sub
    If Not Intersect(Target, Range("A1:A5")) Is Nothing Then
        Application.EnableEvents = False
        Target.Value = UCase(Target.Value)
        Application.EnableEvents = True
    ElseIf Not Intersect(Target, Range("B1:B5")) Is Nothing Then
        Application.EnableEvents = False
        Target.Value = Application.Proper(Target.Value)
        Application.EnableEvents = True
    End If
End Sub