Title Case Validation

M

Mike H

Hi,

Right click your sheet tab, view code and past this in. Text entered will be
changed to proper

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Formula = WorksheetFunction.Proper(Target.Formula)
End Sub

Mike
 
M

Mike H

maybe a bit to buggy, try this instead

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Target.Formula = WorksheetFunction.Proper(Target.Formula)
End Sub
 
M

Mike H

Yes that's possible, try this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B6, E6, B9, E9 ,B15")) Is Nothing Then
Target.Formula = WorksheetFunction.Proper(Target.Formula)
End If
End Sub

Mike
 
J

jen2018

Thanks, it worked perfectly

Mike H said:
maybe a bit to buggy, try this instead

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Target.Formula = WorksheetFunction.Proper(Target.Formula)
End Sub
 
Top