'Macro to Change All Text in a Cell Range to Initial Capital Letters

PHOTO EMBED

Wed Sep 08 2021 04:54:06 GMT+0000 (Coordinated Universal Time)

Saved by @cnewnham #vba

Sub ConverttoSentanceCase() 'Macro to Change All Text in a Cell Range to Initial Capital Letters
   
 Dim Rng As Range
   ' Loop to cycle through each cell in the specified range.
   For Each Rng In Selection.Cells
      ' There is not a Proper function in Visual Basic for Applications.
      ' So, you must use the worksheet function in the following form:
      Rng.Value = Application.Proper(Rng.Value) 'rng is the Dim Value - I.e. if see x.value can replace x with rng which is Dim Value
   Next
End Sub
content_copyCOPY