Reversing first and last names in one cell

T

Té

Is there a way I can reverse first and last names in Excel when the first and
last name is within one cell?
When my software exports it last name, first name it brings it into one cell.
 
G

Gary''s Student

With a name in A1 use:

=REPLACE(A1&" "&LEFT(A1,FIND(",",A1)-1),1,FIND(",",A1)+1,"")
 
T

Té

Thank you!!!!

David Biddulph said:
It wouldn't be any good putting it in the cell where you have names, because
you would then be over-writing the names with your formula. Put the formula
somewhere else; an adjacent column is often most convenient. In answer to
the question which I think you may have intended to ask, then yes, you need
a copy of the formula referring to each cell from which you want the answer.
You have at least 3 options:
Copy the original formula and then paste down the rest of the column.
Select the bottom right-hand corner of the cell and the cursor will turn
into a + which then works as a "fill handle" which you can drag down the
column.
If your formula is adjacent to your original data column, double-clicking on
the fill handle will fill the formula down the column as far as there is
contiguous data.
 
R

Rick Rothstein

I can't see the original thread (so I don't know if I already offered this
solution to you or not), but here is another solution you may want to
consider...

Assuming there is always a space after the comma...

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

otherwise (which will work if the space is there or not)...

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

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