reversing first and last name

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
 
D

dvt

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
 
D

dvt

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
 
M

Mike

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)
 

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

Top