Results 1 to 10 of 18

Thread: Initial capital customized

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    15
    Here is another macro that you can try...
    Code:
    Sub SpecialProperCase() Dim R As Long, X As Long, CellVals As Variant, Words() As String CellVals = Range("B3", Cells(Rows.Count, "B").End(xlUp)) For R = 1 To UBound(CellVals) Words = Split(Application.Proper(CellVals(R, 1))) For X = 0 To UBound(Words) If Words(X) Like "#*" Then Words(X) = UCase(Words(X)) ElseIf " di da con per mm in a e la le " Like "*[!A-Z0-9]" & LCase(Words(X)) & "[!A-Z0-9]*" Then Words(X) = LCase(Words(X)) End If Next CellVals(R, 1) = Join(Words) Next Range("G3:G" & UBound(CellVals)) = CellVals End Sub
    Note: If you find there are other stand-alone words that you want to appear all lower case, add them to the space delimited list shown in blue above (but make sure the text starts and ends with a space after you have done so).
    Last edited by Rick Rothstein; 09-19-2015 at 12:25 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •