LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change order of data in a cell Ron Rosenfeld Excel Programming 0 January 6th 09 09:40 PM
How to change the series order in a LEGEND ONLY...not data Steve P[_2_] Charts and Charting in Excel 2 December 3rd 08 08:44 AM
Change order of data in a cell Mary-Anne Excel Discussion (Misc queries) 3 October 30th 08 09:51 AM
How do I change the order of the data in a pie chart - excel 2003 carincamille Charts and Charting in Excel 1 February 12th 07 07:35 PM
How do I change the order of the series in the Source Data? Earl Charts and Charting in Excel 2 February 2nd 05 03:09 PM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"