reversing first and last name

  • Thread starter Thread starter Mich
  • Start date Start date
M

Mich

I have a cell that has the last name, first name. I would
like to make it first name last name. Any suggestions?
Thanks
 
Mich said:
I have a cell that has the last name, first name. I would
like to make it first name last name. Any suggestions?
Thanks

If "last name, first name" is in A7, put this formula in another cell:

=MID(A7,FIND(",",A7),256)&" "&(LEFT(A7,FIND(",",A7)-1))

Assumptions:
-name is <= 256 characters long
-the comma is only used to separate the two names; it is never part of the
name itself

Dave
dvt at psu dot edu
 
Mich said:
I have a cell that has the last name, first name. I would
like to make it first name last name. Any suggestions?
Thanks

Oops - I forgot the +2 in the original formula. Same restrictions apply.

=MID(A7,FIND(",",A7)+2,256)&" "&(LEFT(A7,FIND(",",A7)-1))

Dave
dvt at psu dot edu
 
As long as there is a space after the comma, this will do.

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