View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Seyed Seyed is offline
external usenet poster
 
Posts: 1
Default Change order of data in a cell


I suggest using the Split function:

Sub SplitThenReverse()
Dim txt, a, i, range

'''''This can be the selected Cell''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''
txt = "First,Middle,Last"

'''''''''''''You may change the delimeter to anything you like'''''''''''''
''''''''''''and Note that it will return an Array of string
''''''''''''''''''''''''
a = Split(txt, ",")
Length = UBound(a)
For i = 0 To Length
MsgBox (a(Length - i))
Next i


End Sub

Ofcourse you may replace the MsgBox() with appropriate assignment to your
desired cell.

"David" wrote:

Is it possible to write a macro that will change cells that have "Last Name,
First Name, Middle Initial" to "First Name, Middle Initial, Last Name" ?
Thank you for your help.
David