+ Reply to Thread
Results 1 to 4 of 4

Sort by Numeric value from Alphanumeric column

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    61

    Sort by Numeric value from Alphanumeric column

    Dear experts,

    I want to sort data by numeric part in alphanumeric values...


    Col A
    AB12343
    ABCD23434
    GBD453456

    Now i need to sort only based on numeric value in above list...

    can somebody suggest me a way in macro or someother workaround please..
    Last edited by onenessboy; 07-08-2012 at 01:50 AM.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Sort by Numeric value from Alphanumeric column

    Separate the numeric values from Column A and list them in Column B by using the below. Then sort all data based on column 'B'

    =LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))

    Courtesy: oldchippy
    http://www.excelforum.com/excel-work...ic-string.html
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-06-2012
    Location
    Janesville, WI
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Sort by Numeric value from Alphanumeric column

    You can also use this formula to extract the numeric portion of the string:

    =1*MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW($1:$9),1)),0),COUNT(1*MID(A1,ROW($1:$9),1)))

    There are two important things to note in order for this formula to work properly. First, this is an array formula so you need to press CTRL+SHIFT+ENTER. Secondly, the 9 in this formula represents the maximum number of characters to evaluate. If you have a 10 character string with this formula it will truncate the last number.

    Source:
    http://office.microsoft.com/en-us/ex...001154901.aspx

    In order to quickly find the maximum number of characters in your data, use the following array formula (this one I actually came up with):

    =MAX(LEN(A:A))

    Ryan

  4. #4
    Registered User
    Join Date
    07-06-2012
    Location
    Janesville, WI
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Sort by Numeric value from Alphanumeric column

    You can also use this formula to extract the numeric portion of the string:

    =1*MID(A1,MATCH(TRUE,ISNUMBER(1*MID(A1,ROW($1:$9),1)),0),COUNT(1*MID(A1,ROW($1:$9),1)))

    There are two important things to note in order for this formula to work properly. First, this is an array formula so you need to press CTRL+SHIFT+ENTER. Secondly, the 9 in this formula represents the maximum number of characters to evaluate. If you have a 10 character string with this formula it will truncate the last number.

    Source:
    http://office.microsoft.com/en-us/ex...001154901.aspx

    In order to quickly find the maximum number of characters in your data, use the following array formula (this one I actually came up with):

    =MAX(LEN(A:A))

    Ryan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1