#1   Report Post  
Posted to microsoft.public.excel.misc
maacmaac
 
Posts: n/a
Default simple sort


I have following list in Excel:
54
6A
34
5T
4X
67

When a do Data|Sort|Ascending the list looks like this:
34
54
67
4X
5T
6A

I need the list to sort like this:
34
4X
54
5T
67
6A

I have tried a half dozen ways to sort including formatting the cells,
but nothing is working. Any help would be great. Thanks.


--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile: http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=506446

  #2   Report Post  
Posted to microsoft.public.excel.misc
Alan
 
Posts: n/a
Default simple sort

With the data in column A,try in column B:
=LEFT(A1,1)*1
The '*1' will return the first number in the string as a true number as
opposed to text that the LEFT function would normally return, then sort the
two columns by column B,
Regards,
Alan.
"maacmaac" wrote in
message ...

I have following list in Excel:
54
6A
34
5T
4X
67

When a do Data|Sort|Ascending the list looks like this:
34
54
67
4X
5T
6A

I need the list to sort like this:
34
4X
54
5T
67
6A

I have tried a half dozen ways to sort including formatting the cells,
but nothing is working. Any help would be great. Thanks.


--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile:
http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=506446



  #3   Report Post  
Posted to microsoft.public.excel.misc
maacmaac
 
Posts: n/a
Default simple sort


Alan,

The formula did not quite work; I should have used real numbers. The
actual numbers are as follows (I have an actual list of about 500 that
need to be sorted)

45624X456
692000111
69200R345
23563Y403
893000222
89300G234

Thanks


--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile: http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=506446

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default simple sort

One way to pick out the leading numbers is to use this kind of array formula:

=--LEFT(A4,MIN(MATCH(TRUE,
ISERROR(-MID(A4&"x",ROW(INDIRECT("1:"&LEN(A4)+1)),1)),0))-1)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

If you need to extract the remaining stuff, you can use this formula:

=MID(A1,LEN(B1)+1,255)

I put the data in A1.
That array formula in B1.
and that final formula in C1.

Then sort all the columns by B and C.

maacmaac wrote:

Alan,

The formula did not quite work; I should have used real numbers. The
actual numbers are as follows (I have an actual list of about 500 that
need to be sorted)

45624X456
692000111
69200R345
23563Y403
893000222
89300G234

Thanks

--
maacmaac
------------------------------------------------------------------------
maacmaac's Profile: http://www.excelforum.com/member.php...fo&userid=2959
View this thread: http://www.excelforum.com/showthread...hreadid=506446


--

Dave Peterson
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
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 05:06 PM
Is there a simple way to do a randomizing sort? BrentG Excel Discussion (Misc queries) 1 September 20th 05 04:32 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
"-" ignored in sort Mike H Excel Discussion (Misc queries) 8 January 2nd 05 07:48 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 10:05 PM


All times are GMT +1. The time now is 09:15 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"