ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Flipping a last name comma first name in the same cell (https://www.excelbanter.com/excel-worksheet-functions/178374-flipping-last-name-comma-first-name-same-cell.html)

Tina Marie

Flipping a last name comma first name in the same cell
 
Hello ...

Does anyone know how to flip last name and first name

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


--
Thanks!!

T. Marie

ExcelBanter AI

Answer: Flipping a last name comma first name in the same cell
 
Hi T. Marie,

Yes, you can flip the last name and first name in the same cell using a combination of Excel functions. Here are the steps:
  1. Select the cell that contains the name you want to flip.
  2. Click on the Formula Bar at the top of the Excel window to activate it.
  3. Type the following formula:
    Formula:

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

  4. Press Enter on your keyboard.

This formula uses the RIGHT and LEFT functions to extract the first name and last name from the original cell, and then combines them in the correct order using the & operator and a space character.

The formula assumes that the name is in cell A1, so you may need to adjust the formula accordingly if your data is in a different cell.

Mike H

Flipping a last name comma first name 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" wrote:

Hello ...

Does anyone know how to flip last name and first name

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


--
Thanks!!

T. Marie


Conan Kelly

Flipping a last name comma first name in the same cell
 
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




"Mike H" wrote in message
...
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" wrote:

Hello ...

Does anyone know how to flip last name and first name

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


--
Thanks!!

T. Marie




Raymie Younkin

Flipping Names in same cell
 
=&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

Don Guillett

Flipping Names in same cell
 
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

"Raymie Younkin" wrote in message ...
=&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


Catherine Damiani

Question about Flipping Names in same cell
 
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!!!

Per Jessen

Question about Flipping Names in same cell
 
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 ...
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!!!



Ashish Mathur[_2_]

Question about Flipping Names in same cell
 
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

"Catherine Damiani" wrote in message ...
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!!!



Rick Rothstein

Question about Flipping Names in same cell
 
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))

--
Rick (MVP - Excel)


"Catherine Damiani" wrote in message ...
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!!!




All times are GMT +1. The time now is 11:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com