+ Reply to Thread
Results 1 to 5 of 5

Convert a column of mixed formats to a column that is all text formatted for sorting

  1. #1
    Registered User
    Join Date
    07-10-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Convert a column of mixed formats to a column that is all text formatted for sorting

    Want to be able to sort a column where all entries beginning with a 1 are sorted before all entries beginning with a 2, then 3, then 4, etc. regardless of the length.


    999
    1003

    want the results to be

    1003
    999

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Convert a column of mixed formats to a column that is all text formatted for sorting

    Hi mrp,

    Can you share more data .. may be 5-6 numbers more.. to clarify this further.. Thanks.

    what would be the result if you short :-
    11
    12
    21
    22
    31
    30
    20
    111
    211
    311


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    07-10-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Convert a column of mixed formats to a column that is all text formatted for sorting

    the resulting sort from your numbers would be
    11
    111
    12
    21
    211
    22
    20
    31
    311
    30

    another example
    1
    111111
    111211
    111232
    111555
    111567
    112211
    112232
    114789
    114791
    118450
    118490
    119020
    119121
    2
    21
    222
    231789
    232890

    thanks

  4. #4
    Registered User
    Join Date
    04-13-2012
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: Convert a column of mixed formats to a column that is all text formatted for sorting

    Format column as Text.

    Or:

    =TEXT(A1,"0")
    =FIXED(A1,0)
    Both of these will format with any decimal places. Change the 0 as required (e.g =TEXT(A1,"0.00") =FIXED(A1,2) will both give two decimal places).

    =CONCATENATE(A1) will force the value in A1 to become text (in the result cell, I mean).
    Last edited by GazP; 08-25-2012 at 07:36 AM. Reason: Remove double post

  5. #5
    Registered User
    Join Date
    07-10-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Convert a column of mixed formats to a column that is all text formatted for sorting

    Concatenate gave me the exact results that I wanted.

    Many 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