View Single Post
  #10   Report Post  
JoannieMaj JoannieMaj is offline
Junior Member
 
Posts: 13
Default Thanks, Carry

I sleep better at night knowing there are brains like this on the planet. :)
THANKS!
Joan




Quote:
Originally Posted by GS[_6_] View Post
Actually tested, but still not as brilliant as Claus' wizardry!

Function myNames$(myRange As Range)
Dim vNames, vTmp(), s1$
s1 = myRange.Value

If vNames(1) = vNames(UBound(vNames)) _
And UBound(vNames) 1 Then
vNames = Split(s1, " "): ReDim vTmp(UBound(vNames) - 1)
vTmp(0) = vNames(0): vTmp(1) = vNames(2)
vTmp(2) = vNames(3): vTmp(3) = vNames(4)
s1 = Join(vTmp, " ")
End If
myNames = s1
End Function

--
Garry

Free usenet access at www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion