+ Reply to Thread
Results 1 to 4 of 4

Sorting in a weird way

  1. #1
    Registered User
    Join Date
    05-02-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    15

    Sorting in a weird way

    Hey i would like to know if there is a way to sort this information by the 2nd and 3rd digit. So basically i would want this
    As2d
    8s8c
    9s9d
    9c7d
    5s3c
    5s4c
    5d3c
    9c6d
    9c9s

    to sort A-Z like this:
    5s3c
    5d3c
    5s4c
    8s8c
    9c6d
    9c7d
    9s9d
    9c9s
    As2d

    At the moment if i sort A-Z it doesn't group the 5x3x together it will instead list as this:
    5d3c
    5s4c
    5s3c

    Thanks

    lewgill

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting in a weird way

    Assuming the list starts in A2, put this formula in B2 and copy down..

    =LEFT(A2) & "-" & MID(A2,3,1)

    This gives you an extracted code of the first and third digits. Now sort both A:B making sure to select B first so it is the primary column, then sort.

    Video Example
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    05-02-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Sorting in a weird way

    Nice one thanks very much, I have another problem here if you are interested? http://www.excelforum.com/excel-form...41#post3243341

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting in a weird way

    I've marked this thread as SOLVED for you.
    Next time, select Thread Tools from the links above and mark this thread as SOLVED. Thanks.

+ 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