#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 16
Default sorting lists

I have a list with entries like so:

1990CJ000123
1991CJ000124
1992DJ000124
1993CJ000125
1992CJ000124
1992CJ000125
1992CJ000126
1991DJ000137

How can I sort the lists by the year (IE 1991, etc) but make sure the DJ's
and the CJ's are mixed together? In other words, I do not want the entries
that contain CJ to be at the top of the list and the DJ entries to be at the
bottom.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default sorting lists

Produce a helper column =LEFT(A2,4)&RIGHT(A2,6)
and sort by that.
--
David Biddulph

"TimJames" wrote in message
...
I have a list with entries like so:

1990CJ000123
1991CJ000124
1992DJ000124
1993CJ000125
1992CJ000124
1992CJ000125
1992CJ000126
1991DJ000137

How can I sort the lists by the year (IE 1991, etc) but make sure the DJ's
and the CJ's are mixed together? In other words, I do not want the
entries
that contain CJ to be at the top of the list and the DJ entries to be at
the
bottom.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default sorting lists

Add a helper column with a formula of

=--Left(A1,4)

and sort on that column.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"TimJames" wrote in message
...
I have a list with entries like so:

1990CJ000123
1991CJ000124
1992DJ000124
1993CJ000125
1992CJ000124
1992CJ000125
1992CJ000126
1991DJ000137

How can I sort the lists by the year (IE 1991, etc) but make sure the DJ's
and the CJ's are mixed together? In other words, I do not want the
entries
that contain CJ to be at the top of the list and the DJ entries to be at
the
bottom.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,290
Default sorting lists


A standard Excel ascending sort produces...
1990CJ000123
1991CJ000124
1991DJ000137
1992CJ000124
1992CJ000125
1992CJ000126
1992DJ000124
1993CJ000125
It doesn't appear that any special sorting methods are necessary.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming - check out Special Sort)




"TimJames"
wrote in message
I have a list with entries like so:

1990CJ000123
1991CJ000124
1992DJ000124
1993CJ000125
1992CJ000124
1992CJ000125
1992CJ000126
1991DJ000137

How can I sort the lists by the year (IE 1991, etc) but make sure the DJ's
and the CJ's are mixed together? In other words, I do not want the entries
that contain CJ to be at the top of the list and the DJ entries to be at the
bottom.

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 two lists Blah Excel Discussion (Misc queries) 1 May 17th 06 07:27 PM
Sorting lists bryce Excel Discussion (Misc queries) 3 May 12th 06 05:00 PM
Sorting lists famdamly Excel Discussion (Misc queries) 2 February 26th 06 09:58 PM
Sorting LISTs Tia Excel Discussion (Misc queries) 2 November 22nd 05 05:52 PM
Sorting 2 lists jtoy Excel Discussion (Misc queries) 1 July 15th 05 03:36 AM


All times are GMT +1. The time now is 03:45 AM.

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

About Us

"It's about Microsoft Excel"