how do I invert all of my cell entries ?

  • Thread starter Thread starter Kimmie23
  • Start date Start date
K

Kimmie23

Can someone please explain how to invert all the cel entries in an excel
spread sheet. i.e. John and Sally Hancock becomes Hancock, John and Sally?
 
=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))&",
"&LEFT(A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)))-1)
 
Give this formula a try...

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

Rick
 
Of course, my newsreader (and I'm guessing others) split the line at a blank
space. Here is the same formula with a forced break so that your newsreader
won't break it at the space...

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

Rick
 

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

Back
Top