Flip Name Order [first name] [last name] to [last name], [first name]

I have a list of 250 names in one field where the name is listed as  [first name] [last name].

I need, in a column next to the name field, convert/flip the name structure to [last name], [first name]. What's the quickest way to go about this?
eossmaAsked:
Who is Participating?
 
MacroShadowCommented:
=MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1))
0
 
Saurabh Singh TeotiaCommented:
Assuming you have square brackets in first and last name shown in example..

If your value is in A1..

Write this formula in B1...

=RIGHT(A1,LEN(A1)-FIND("[",A1,FIND("[",A1,1)+1)+1)&", " & LEFT(A1,FIND("]",A1,1)+1)

Saurabh...
0
 
Neil RussellTechnical Development LeadCommented:
Two things to consider....

Is the data ALWAYS ONLY Two Names, Firstname Lastname?
Do you have or may have in the future International customers?

We were faced with a similar task not long ago that on paper looks simple but IF either of the above come into play then you can not ask a computer to do it for you with 100% certainty.  I believe that some Indonesian and/or Sri lankan names may have four separate parts and that offence can easily be caused to people and indeed customers lost if you address them incorrectly.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
eossmaAuthor Commented:
SUPER FAST! THX
0
 
eossmaAuthor Commented:
OOPS! Just noticed if I add the comma:
=MID(A1&", "&A1,FIND(" ",A1)+1,LEN(A1))

 . . it shortens the first name by one character.
0
 
MacroShadowCommented:
=MID(A1&", "&A1,FIND(" ",A1)+1,LEN(A1)+1)
0
 
eossmaAuthor Commented:
THANK YOU!
0
 
Saurabh Singh TeotiaCommented:
Hey Macroshadow,

Really liked the logic that you have used in this one..Good one..really smart i like it .. :-)

Saurabh...
0
 
MacroShadowCommented:
@Saurabh Singh Teotia, Thanks.
0
 
MacroShadowCommented:
@eossma, You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.