Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

alphanumeric sorting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 25 Apr 2007 16:59 GMT
I got this data in a column:

100A
100B
100C
10A
10B
45A
45B
45C
4B
4D

and I need to sort it so it comes out this way:
4B
4D
10A
10B
45A
45B
45C
100A
100B
100C

Anyone know how I can do this?

Regards
Mike
Ron Rosenfeld - 25 Apr 2007 17:19 GMT
>I got this data in a column:
>
[quoted text clipped - 25 lines]
>Regards
>Mike

Set up an adjacent "helper column".

Extract just the numeric portion of your data to go into this helper column.
You can do this using the formula:

=LOOKUP(9.9E+307,--MID(A1,MIN(SEARCH(
{0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),
ROW(INDIRECT("1:"&LEN(A1)))))

(substitute the address of the first cell in your column for A1, and fill
down).

Select both columns (or a larger range if necessary).

Sort ascending
    First by the "helper column"
    Then by the original data column.

--ron
Erny - 25 Apr 2007 21:07 GMT
Hi Mike,

I would add a column temporarily to the right with the following formula
(suppose your first value is in cell A1 and you added a column B). In cell
B1 I enter:

=VALUE(LEFT(A1,LENGTH(A1)-1))

and replicate it to all cells where I have values in the first column;

Next, I would sort the 2 columns A and B by selecting as first item column B
and next item column A (both ascending).
Finally, once data is sorted, I would delete the temporary column B.

Kind regards,
Erny

>I got this data in a column:
>
[quoted text clipped - 25 lines]
> Regards
> Mike
David McRitchie - 25 Apr 2007 23:20 GMT
Hi Mike,
I don't see your original post except within Emy's reply.
Expect that your data is not just simply all have a single
letter suffix as you have represented.   Take a look at
  http://www.mvps.org/dmcritchie/excel/sorting.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages:  http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:        http://www.mvps.org/dmcritchie/excel/search.htm

> Hi Mike,
>
[quoted text clipped - 42 lines]
> > Regards
> > Mike

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.