View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default PLS SUGEST VB CODE TO REMOVE INITIALS FROM NAME AND ATTACH IT TO T

Sub initializer()
For Each r In Selection
s = Split(r.Value, ".")
l = UBound(s)
f = LBound(s)
recon = s(l) & " "
j = 0
For i = f To l - 1
If j = 0 Then
recon = recon & s(i)
j = 1
Else
recon = recon & "." & s(i)
End If
Next
r.Value = recon
Next
End Sub

--
Gary''s Student - gsnu200734


"CAPTGNVR" wrote:

DAER ALL
I have 3 thou odd names in excel97. The names are entered like
A.S.R.CHARLIE;
P.K.WHITE; M.PETER and so on.

Can u pls sugest VB code so that I can run through each cell and take
these initials and attach it at the end of the name after giving a
space or two like CHARLIE A.S.R; PETER M. and so on. Pls
help.