View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Macro to Function

I don't remember your original data, but I think this function will do what
you want...

Function GetName(S As String) As String
Dim Parts() As String
GetName = Replace(Split(S, "\")(UBound(Split(S, "\"))), ".", " ")
Parts = Split(GetName, " ", 3)
Parts(2) = ""
GetName = Trim(Join(Parts))
End Function

--
Rick (MVP - Excel)


"K" wrote in message
...
basically i need function to exctract name from text