Vincent88
Active Member
- Joined
- Mar 5, 2021
- Messages
- 382
- Office Version
- 2019
- Platform
- Windows
- Mobile
Hi, Appreciate any help to modify the code to apply the function to the dynamic range in a column only not whole column ?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim LastRow As Long
LastRow = Range("L2").End(xlDown).Row
If Target.Cells.Count > 1 Then Exit Sub
On Error GoTo ErrHandler:
If Target.Column = 12 Then
If Not IsNumeric(Target.Value) Then
Application.EnableEvents = False
Target.Value = StrConv(Target.Text, vbProperCase)
Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub