View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Sorting Alphanumeric data

Some self promotion for my Special Sort Excel add-in follows.
An independent review of the program however, can be found here...
http://www.contextures.com/excel-sort-addin.html

The program has 30+ different ways to sort including sorting...
...using the first group of numbers only
...using the last group of numbers only
...using all characters but with numbers sorting in strict numerical sequence.
(3 is treated as 03 so it sorts before 15)
Also prefix sort, suffix sort, mid sort, decimal sort, table sort, color sorts and more.

3 week free trial can be downloaded from...
http://www.mediafire.com/PrimitiveSoftware
--
Jim Cone
Portland, Oregon USA




"David G."
wrote in message
...
I have a long list of part numbers that contain mixed alpha-numeric
characters in no restricted fashion. i.e.
179802
A143B1
A1
CH03M
A15
R3
125B

etc.

The column never sorts correctly. "A3" follows "A15" because Excel
sorts everything like text.
I've looked at a number of examples of how others have addressed this
issue, but inconsistent format of my numbers prohibits using any
built-in Excel function that I know.
I'd just like to confirm that the only way to sort this list properly
is to parse all of the characters into alpha only, and numeric only,
groups. Put the groups into successive columns then have Excel sort
the data by the multiple columns.

Parsing would look like this:
179802 -- 179802
A143B1-- A 143 B 1
A1-- A 1
CH03M-- CH 03 M
A15 -- A 15
R3 -- R 3
125B -- 125 B

I would appreciate any comments.
THANKS!
David G.