View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
tjtjjtjt tjtjjtjt is offline
external usenet poster
 
Posts: 51
Default Switch names in cell

Thanks, Chip.
--
tj


"Chip Pearson" wrote:

Try the following:

Dim Rng As Range
Dim S As String
Dim Pos As Integer
For Each Rng In Range("A1:A10")
S = Rng.Text
Pos = InStr(1, S, ",")
If Pos 0 Then
Rng.Value = Mid(S, Pos + 2) & " " & Left(S, Pos - 1)
End If
Next Rng




--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"tjtjjtjt" wrote in message
...
Does anyone have a routine that can take a list of names
entered as
"Lastname, Firstname" and change those names to "Firstname
Lastname" within
the same cells?

Thanks,

--
tj