How do I replace multiple words in a worksheet?
Words like: Da...da, Do...do, Dos, De... de.. etc.
How to adapt it in my spreadsheet called "Customers3"?
Public Function MyProper(MyString As String, Optional exceptions As Variant)
Dim c As Variant
If IsMissing(exceptions) Then
exceptions = Array("a", "as", "e", "o", "os", "da", "das", "de", "di", "do", "dos", _
"CPF", "RG", "E-Mail")
End If
MyString = Application.Proper(MyString)
For Each c In exceptions
MyString = Replace(" " & MyString & " ", " " & c & " ", " " & LCase(c) & " ", , , vbTextCompare)
Next c
MyProper = MyString
End Sub
=MyProper(A1)?