Rearranging first name and surname in Excel

EleanorSykes1989

New Member
Joined
Aug 7, 2017
Messages
16
Hi there,

I have a list of names in excel in the below format; however I need to re-arrange the cells to read "Colin Smith", (dropping the ,).

[TABLE="width: 160"]
<tbody>[TR]
[TD]Smith, Colin

Is there a simple way of doing this please?

Many thanks [/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
How about:
Code:
=RIGHT(A1,LEN(A1)-SEARCH(",",A1)-1)&" "&LEFT(A1,SEARCH(",",A1)-1)
 
Upvote 0
And just another option...


Excel 2013/2016
AB
1Smith, ColinColin Smith
Sheet1
Cell Formulas
RangeFormula
B1=MID(A1&" "&A1,FIND(",",A1)+2,LEN(A1)-1)
 
Upvote 0
Where the name is in A1
Code:
=TRIM(MID(A1,SEARCH(",",A1)+1,999))&" "&LEFT(A1,SEARCH(",",A1)-1)
 
Upvote 0
VBA for kicks. It compensates for middle names and initials.

Code:
Sub switch()
Dim txt As Variant, c As Range
 For Each c In Range("A2", Cells(Rows.Count, 1).End(xlUp))
    txt = Split(c.Value, " ")
    c = txt(UBound(txt)) & ", " & txt(LBound(txt))
    If UBound(txt) > 1 Then
        c = c & " " & txt(1)
    End If
 Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top