View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Switch names in cell

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