ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Function to Rearrange Name (https://www.excelbanter.com/excel-worksheet-functions/25902-function-rearrange-name.html)

Karen

Function to Rearrange Name
 
Let's say I have a cell (A1) that contains the following:
Smith, John D.
and I want a formula that will return:
John D. Smith

How can this be done?
Thank you

N Harkawat

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

"Karen" wrote in message
...
Let's say I have a cell (A1) that contains the following:
Smith, John D.
and I want a formula that will return:
John D. Smith

How can this be done?
Thank you




Karen

Thank you VERY much - It works great!

"N Harkawat" wrote:

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

"Karen" wrote in message
...
Let's say I have a cell (A1) that contains the following:
Smith, John D.
and I want a formula that will return:
John D. Smith

How can this be done?
Thank you





Gary Brown

Or
=TRIM(RIGHT(A1,LEN(A1)-FIND(",",A1)) & " " & LEFT(A1,FIND(",",A1)-1))
HTH,
--
Gary Brown



"Karen" wrote:

Let's say I have a cell (A1) that contains the following:
Smith, John D.
and I want a formula that will return:
John D. Smith

How can this be done?
Thank you



All times are GMT +1. The time now is 12:09 AM.

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