Flipping a last name comma first name in the same cell

  • Thread starter Thread starter Tina Marie
  • Start date Start date
T

Tina Marie

Hello ...

Does anyone know how to flip last name and first name

e.g. Robinson, Tina to Tina Robinson in the same cell
 
Hi,

If it must be in the same cell then that's a macro so post back but if an
adjacent cell will do try this for a name in a1

=MID(A1,SEARCH(" ",A1)+1,LEN(A1))&" "&LEFT(A1,SEARCH(",",A1)-1)

Mike
 
Tina Marie,

Then you could copy from the results of the formula Mike H provided, and
paste special as values into the original cell, then delete the formula.

HTH,

Conan
 
=&RIGHT(C3,LEN(C3)-FIND(",",C3,1))&" " &LEFT(C3,FIND(",",C3,1)-1)&

Where C3 is the cell with the name formatted as

Smith, John
 
Sub flipnameinsamecell()
For Each c In range("a2:a22")'Selection
x = InStr(c, ",")
c.Value = Right(c, Len(c) - x) & " " & Left(c, x - 1)
Next c
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
in message news:[email protected]...
 
say i have John Smith in A1 and want it to be Smith John in A2, what would the formula look like that would be in A2?

thank you!!!
 
Hi

This will not work if A1 contains a middlename.

=RIGHT(A1,SEARCH(" ",A1)) & " " & LEFT(A1,SEARCH(" ",A1)-1)

Regards,
Per

"Catherine Damiani" skrev i meddelelsen news:[email protected]...
 
Hi,

If there is no middle name, then select column A and then Data > Text to
columns. While on delimited, click next and on the next screen, uncheck all
boxes except spaces. Click on finish. Now in a spare column, enter B1&"
"&A1

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

in message news:[email protected]...
 
This will work as long as there is no middle initial or middle name and as
long as the first name is never made up of two names (such as Mary Anne)...

=MID(A1&" "&A1,FIND(" ",A1)+1,LEN(A1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top