
Originally Posted by
StephenR
Why not like this?
Well primarily becuase column B is to be in Proper Case and C an D are in Upper Case, but also because I don't want it to affect the column titles.
I did try
Private Sub Worksheet_change(ByVal Target As Range)
If Target.Cells.Count > 1 Then
Exit Sub
End If
On Error GoTo ErrHandler:
If Not Application.Intersect(Me.Range("D2:D65535"), Target) Is Nothing Then
If IsNumeric(Target.Value) = False Then
Application.EnableEvents = False
Target.Value = StrConv(Target.Text, vbUpperCase)
Application.EnableEvents = True
End If
End If
If Not Application.Intersect(Me.Range("B2:B65535"), Target) Is Nothing Then
If IsNumeric(Target.Value) = False Then
Application.EnableEvents = False
Target.Value = StrConv(Target.Text, vbProperCase)
Application.EnableEvents = True
End If
End If
ErrHandler:
Application.EnableEvents = True
End Sub
But it wouldn't work, hence the cases. I'm Currently trying to tidy up the code a bit for instance, where I need C2:C65535 , D2:D65535 and say G2:G65535 in upper case is it possible to have all 3 ranges in the same case?
Bookmarks