Title Case


Posted by Kelvin on December 20, 2000 12:16 PM

Does anyone know if there is a way to enforce title case in Excel? That is, every word entered in a cell will begin with a capital letter.

Posted by lenze on December 20, 2000 1:45 PM

One way is to use the PROPER function
PROPER(text)

i.e. =PROPER("this is a test") produces
This Is A Test.
Then you can copy and paste special values



Posted by Tim Francis-Wright on December 20, 2000 2:08 PM

You can also put the following code in the
Sheet object in question:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Application.WorksheetFunction.IsText(Target) = True Then
Target.Formula = Application.WorksheetFunction.Proper(Target.Formula)
End If
End Sub

This won't force copied text from the clipboard
to Proper Capitalization, but it will do so
for any text inputted directly into cells.