Use this code
------
Function ExtractFirstLetter(text) As String
mystring = Left(text, 1)
For i = 2 To Len(text) - 1
If Mid(text, i, 1) = " " Then
mystring = mystring & Mid(text, i + 1, 1)
End If
Next i
ExtractFirstLetter = WorksheetFunction.Substitute(UCase(mystring), " ", "")
End Function
--------------
Use it like this:

No comments:
Post a Comment