#1   Report Post  
johncu
 
Posts: n/a
Default Help with sorting..


Hi guys, first time here, hope someone can help.

I had a sheet that had names entered in column A, going in order of
surname, eg:
John Adams
Simon Allison
James Baker
Tessa Cunningham
etc...

I messed up a sort and then sorted by column A again to get it back in
alphabetical order, forgetting it would sort by the first names! So now
it reads:

James Baker
John Adams
Simon Allison
Tessa Cunningham.

Does anyone know how i can sort it back by the second word in Column
A??


--
johncu
------------------------------------------------------------------------
johncu's Profile: http://www.excelforum.com/member.php...o&userid=27908
View this thread: http://www.excelforum.com/showthread...hreadid=474048

  #2   Report Post  
Stefi
 
Posts: n/a
Default

I'm afraid, you have to create a helper column to reverse the order of first
names and surnames with this formula:
=MID(A1,SEARCH(" ",A1)+1,99)&LEFT(A1,SEARCH(" ",A1)-1)
fill it down as necessary, and sort by this helper column

Take care! this formula works only if there is two words separated by one
space. In a more complicated case you need a more complicated formula!

Regards,
Stefi

€˛johncu€¯ ezt Ć*rta:


Hi guys, first time here, hope someone can help.

I had a sheet that had names entered in column A, going in order of
surname, eg:
John Adams
Simon Allison
James Baker
Tessa Cunningham
etc...

I messed up a sort and then sorted by column A again to get it back in
alphabetical order, forgetting it would sort by the first names! So now
it reads:

James Baker
John Adams
Simon Allison
Tessa Cunningham.

Does anyone know how i can sort it back by the second word in Column
A??


--
johncu
------------------------------------------------------------------------
johncu's Profile: http://www.excelforum.com/member.php...o&userid=27908
View this thread: http://www.excelforum.com/showthread...hreadid=474048


  #3   Report Post  
sevil_gp
 
Posts: n/a
Default


Highlight the name column and split it into two columns (selecting
datatext to columns). Choose delimited data and select 'space' as the
delimiter.

Sort both columns by surname and then merge the two back together
(Although I'd leave them separate to avoid the same problem).

Garry


--
sevil_gp
------------------------------------------------------------------------
sevil_gp's Profile: http://www.excelforum.com/member.php...o&userid=27905
View this thread: http://www.excelforum.com/showthread...hreadid=474048

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
sorting non contiguous ranges gsh20 Excel Discussion (Misc queries) 1 September 8th 05 04:50 PM
Advice sought: Multiple column sorting davidm Excel Worksheet Functions 3 July 29th 05 02:06 PM
Sorting 1, 1A, 2, 2A, 3, 4, 4A, 4B . . . agc1234 Excel Discussion (Misc queries) 6 May 26th 05 08:02 PM
sorting number in ascending order Janice Lee via OfficeKB.com Excel Discussion (Misc queries) 2 April 8th 05 10:31 PM
Adding a KeyID column for sorting Rebecca New Users to Excel 3 February 20th 05 07:09 PM


All times are GMT +1. The time now is 10:04 AM.

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"