Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End Sub
You can do that like this:Thank you Joe4,
What about a column in a spreadsheet? Let's say all the cells in column B after B4.
Thank you.
Private Sub Worksheet_Change(ByVal Target As Range)
' Exit if more than one cell updated at a time
If Target.CountLarge > 1 Then Exit Sub
' Check to see if entry is made in cell B4 or below
If Target.Column = 2 And Target.Row >= 4 Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If
End Sub
Hi Joe,You can do that like this:
VBA Code:Private Sub Worksheet_Change(ByVal Target As Range) ' Exit if more than one cell updated at a time If Target.CountLarge > 1 Then Exit Sub ' Check to see if entry is made in cell B4 or below If Target.Column = 4 And Target.Row >= 2 Then Application.EnableEvents = False Target.Value = UCase(Target.Value) Application.EnableEvents = True End If End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
' Exit if more than one cell updated at a time
If Target.CountLarge > 1 Then Exit Sub
' Check to see if entry is made in cell B4 or below
If Target.Column = 2 And Target.Row >= 4 Or Target.Column = 5 And Target.Row >= 6 Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If
End Sub