Data within a cell

  • Thread starter Thread starter David
  • Start date Start date
D

David

If names are in cells as "last name, first name, middle initial" can a macro
be run to change the order to "first name, middle initial, last name"?
 
A formula will do

Assuming you have spaces between commas and names,
=MID(A2,FIND(",",A2)+2,FIND(",",A2,FIND(",",A2)))&RIGHT(A2,FIND(",",A2,FIND(",",A2)))&", "&LEFT(A2,FIND(",",A2)-1)

Then just copy down. If you want this more permanent, copy the cells with
formulas, right click, paste special.
 
Hi

No macro is needend.
With the names in column A enter this formula in column B1 and copy
down as needed.

=MID(A1,SEARCH(",",A1;1)+2,100) & ", " & LEFT(A1,SEARCH(",",A1)-1)

Then copy column B, select A1 and goto Paste Special > Select "values"
Ok, then column B can be deleted.

HTH,

Per
 
You could always split the cell into 3 columns by going to Data, then text to
columns and adjust that way as well.
 
Back
Top