View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Switch names in cell

How robust does it need to be

Dim cell as Range, sStr as String
for each cell in Selection
v = Application.Split(cell,",")
sStr = Trim( trim(v(Ubound(v))) & " " & trim(v(Lbound(v))))
cell.Value = sStr
Next

--
Regards,
Tom Ogilvy

"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