Option Explicit
Sub ChangeText_Proper()
Dim cCell As Range
Dim TheRg As Range
'// Incase No constants of type text in the selection!
On Error Resume Next
Set TheRg = Selection.SpecialCells(xlCellTypeConstants, 2)
If TheRg Is Nothing Then MsgBox "No Text!", vbCritical: Exit Sub
On Error GoTo 0
For Each cCell In TheRg
cCell = Application.WorksheetFunction.Proper(cCell)
Next
MsgBox "Done!", vbInformation
End Sub
Change a selection of text to proper case.
The routine below does this for you. Just select the range and run this macro.
From Microsoft Help:
Syntax
PROPER(text)
Text is text enclosed in quotation marks, a formula that returns text, or a reference to a cell containing the text you want to partially capitalize.
Examples
PROPER("this is a TITLE") equals "This Is A Title"
PROPER("2-cent's worth") equals "2-Cent'S Worth"
PROPER("76BudGet") equals "76Budget"