Hi Perry,
Try this:
Sub mcrzzProperCaseTEST2()
'Proper Case selected cells with Exceptions for Prepositions
'Subordinate conjuctions will be capitalized -- because, as, who, if, that, what, why, that, when, where
'Following will be in lower case:
'a, an, the, and, but, for, nor, yet, by, with, on, to, of, at, around
Dim txtString As String
Dim RngCell As Range
Dim StartChar As Double
Dim EndChar As Double
Dim Parined As String
'Do not convert exceptions in cells selected to proper case
For Each RngCell In Selection
txtString = StrConv(RngCell.Text, vbProperCase)
txtString = Application.Substitute(txtString, " Of ", " of ")
RngCell.Value = txtString
StartChar = InStr(RngCell.Text, "(")
EndChar = InStr(RngCell.Text, ")")
If StartChar > 0 And EndChar > 0 Then
If StartChar < EndChar Then
txtString = Mid(RngCell.Value, StartChar, EndChar - StartChar)
txtString = WorksheetFunction.Substitute(RngCell.Text, txtString, StrConv(txtString, 1))
RngCell.Value = txtString
End If
End If
Next RngCell
End Sub
Bookmarks