ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,737
- Office Version
- 2007
- Platform
- Windows
Evening.
I have this working code below
I would like to have the upper case text only apply to the range G13:O42
I then input this line Range("G13:O42").Value = UCase(.Value) so code now shown below but what i found was what if i wrote DOG in cell L31 the word DOG would be inserted into every cell within the range.
I have this working code below
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Column = 14 Then Exit Sub
If .Count = 1 And Not .HasFormula Then
Application.EnableEvents = False
.Value = UCase(.Value)
Application.EnableEvents = True
End If
End With
End Sub
I would like to have the upper case text only apply to the range G13:O42
I then input this line Range("G13:O42").Value = UCase(.Value) so code now shown below but what i found was what if i wrote DOG in cell L31 the word DOG would be inserted into every cell within the range.
Code:
Private Sub Worksheet_Change(ByVal Target As Range) With Target
If .Column = 14 Then Exit Sub
If .Count = 1 And Not .HasFormula Then
Application.EnableEvents = False
Range("G13:O42").Value = UCase(.Value)
Application.EnableEvents = True
End If
End With
End Sub