+ Reply to Thread
Results 1 to 10 of 10

Why not getting data in ascending order?

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Why not getting data in ascending order?

    Hi friends,
    I want to sort the range C5:C1000 in ascending order. I’m not getting it in ascending order after sorting.

    Any help will be highly appreciated.

    Thanking you,
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,749

    Re: Why not getting data in ascending order?

    Because they are not numbers - they are text.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Why not getting data in ascending order?

    If your data were in the same format E01, E02, etc, then it would sort perfectly.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Why not getting data in ascending order?

    C
    D
    E
    4
    Item Sort As
    5
    E1 E01 D5: =PadNum(C5, 2)
    6
    E10 E10
    7
    E11 E11
    8
    E12 E12
    9
    E12 E12
    10
    E13 E13
    11
    E2 E02
    12
    E3 E03
    13
    E4 E04
    14
    E5 E05
    15
    E6 E06
    16
    E7 E07
    17
    E8 E08
    18
    E9 E09
    19
    H1 H01
    20
    H10 H10
    21
    H11 H11
    22
    H13 H13
    23
    H13 H13
    24
    H14 H14
    25
    H2 H02
    26
    H3 H03
    27
    H4 H04
    28
    H5 H05
    29
    H6 H06
    30
    H7 H07
    31
    H8 H08
    32
    H9 H09
    33
    M1 M01
    34
    M10 M10
    35
    M11 M11
    36
    M12 M12
    37
    M13 M13
    38
    M14 M14
    39
    M15 M15
    40
    M16 M16
    41
    M17 M17
    42
    M18 M18
    43
    M2 M02
    44
    M3 M03
    45
    M4 M04
    46
    M5 M05
    47
    M6 M06
    48
    M7 M07
    49
    M8 M08
    50
    M9 M09


    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Why not getting data in ascending order?

    I'd forgotten about PADNUM...

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Why not getting data in ascending order?

    @shg,
    Thank you. It's fine but now it's not possible for me to change the data structure, insert 1 helping column in the database. So is there any solution to achieve the target in single column 'C' only.

    To make the number format same I would like to have 5 digits as E00001, H00001, M00001 and so on.
    A macro solution will be accepted.

    Thank you to Ali and Glen.
    Last edited by mso3; 04-03-2017 at 08:44 PM.

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Why not getting data in ascending order?

    Hi Glenn,

    How to set the custom number format to achieve it. To make the number in same size I have decided to make it 5 digits number. So the number E1 will be E00001, E2 will be E000002 and so on ...


    Thanking you.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Why not getting data in ascending order?

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Why not getting data in ascending order?

    Hi shg,

    Excellent! Perfect as per the requirement.

    Thank you and have a nice time.

  10. #10
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Why not getting data in ascending order?

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. sorting data in ascending date order
    By aparunkumar in forum Excel General
    Replies: 3
    Last Post: 09-02-2016, 06:55 AM
  2. Arrange data in ascending order
    By bezbid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2016, 10:22 AM
  3. AScending order of the data using formula
    By Elainefish in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-01-2014, 06:24 AM
  4. [SOLVED] Sort Ascending order and eliminate zero data
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2013, 01:28 PM
  5. [SOLVED] Generate "ascending order no" for columns of data that are not in order
    By abreichenbach in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-20-2013, 02:22 AM
  6. Sorting Data in ascending order
    By sharon2006 in forum Excel General
    Replies: 1
    Last Post: 03-13-2006, 09:10 PM
  7. Is there a VLOOKUP substitute when data is not in ascending order
    By VJ7777 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2005, 05:06 AM

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