Formatting text

A

amab19

Is there a way to make sure all names in a column have the first letter
upper case, and all other letters lower case? I believe you can in
Access, but couldn't find the same option in Excel 2002.
 
G

Gord Dibben

If you want it to occur automatically when you type in the names you can use
event code.

Would require worksheet event code.

As written, the code below affects all cells in columns A

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column <> 1 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = Application.Proper(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on sheet tab and "View Code".

Copy/paste the code into that module.


Gord Dibben MS Excel MVP

Is there a way to make sure all names in a column have the first letter
upper case, and all other letters lower case? I believe you can in
Access, but couldn't find the same option in Excel 2002.

Gord Dibben MS Excel MVP
 
A

amab19

I don't type them in. I download a Little League database from an
online signup site, and lots of parents leave their Caps Lock key on. I
just need to highlight a column and have it change the text. Any
suggestions?

Thanks.
 
Top