View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Split astring using Capital letter as identifier

Try this UDF:

Function splitcap(wholestr)
splitstr = ""
For i = 1 To Len(wholestr)
currchr = Mid(wholestr, i, 1)
splitstr = splitstr & IIf(Asc(currchr) < 91 And i 1, " ", "") &
currchr
Next i
splitcap = splitstr
End Function

Regards,
Stefi


€˛Raj€¯ ezt Ć*rta:

Hi,

I am looking for a formula/function/UDF that would split
VasantRamPatil into Vasant Ram Patil ( ie split the string into three
words using the capital letter as the initial letter of each word).
The split can be either by inserting spaces inside the string itself
or splitting the string into three strings).

Thanks in advance for the Help.

Regards,
Raj