Resorting full names

G

Guest

I need to resort names in a cell from John & Jane Doe to Doe, John & Jane.

The formulas discussed in previous threads work if there are just a first
and last name in the cell, but not if there are several names as above. Does
anyone have a formula that will work? Thanks.
 
G

Guest

This formula will work, based on 2 assumptions. First, there are no tildes
(~) in any of your names. Second, the last name is always the last word
following the last space.

=MID(A1,FIND("~",SUBSTITUTE(A1," ","~",LEN(A1)-LEN(SUBSTITUTE(A1,"
",""))))+1,1024)&", "&LEFT(A1,FIND("~",SUBSTITUTE(A1,"
","~",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)

Now, there are spaces in the formula, and I'm not sure what this will look
like when it posts. Usually, line breaks will be inserted where the spaces
are, so you may need to adjust accordingly.

HTH,
Elkar
 

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

Similar Threads

parse text string 4
Dup check 2 columns - need it to delete correct one 5
Concatenate Text... with spaces 2
Vlookup, COUNTIF, IF or Nested 1
Countif issue 3
IF FUNCTION? 6
count dates 4
search array 3

Top