Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how do I invert all of my cell entries ?

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 897
Default how do I invert all of my cell entries ?

One way:

=RIGHT(A1,LEN(A1)-FIND(" ",A1,10))&", "&LEFT(A1,FIND(" ",A1,10))

But this only works if all your data is exactly like the example
below.

Check out http://www.cpearson.com/excel/FirstLast.htm for more
samples.

HTH,
JP


On Apr 5, 8:16*am, Kimmie23
wrote:
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?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default how do I invert all of my cell entries ?

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99))&",
"&LEFT(A1,LEN(A1)-LEN(TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",99)),99)))-1)


"Kimmie23" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how do I invert all of my cell entries ?

Give this formula a try...

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

Rick


"Kimmie23" wrote in message
...
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?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how do I invert all of my cell entries ?

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


"Rick Rothstein (MVP - VB)" wrote in
message ...
Give this formula a try...

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

Rick


"Kimmie23" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to invert 2 series? Feejo Charts and Charting in Excel 1 January 1st 08 04:15 PM
Invert a column Jakobshavn Isbrae Excel Worksheet Functions 5 June 13th 07 01:30 AM
How do I invert text (abc--cba) Moset Excel Worksheet Functions 4 April 30th 06 07:30 PM
Invert layout Moshe Rosenberg Excel Discussion (Misc queries) 2 August 26th 05 05:29 AM
Invert Text Gary's Student Excel Discussion (Misc queries) 2 May 14th 05 03:00 AM


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"