+ Reply to Thread
Results 1 to 8 of 8

Ascending Order

  1. #1
    Registered User
    Join Date
    01-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    33

    Ascending Order

    i got data something like this...

    m4-1
    m4-10
    m4-100
    m4-2
    m4-3
    m4-30

    i try to arrange it in ascending order...

    m4-1
    m4-2
    m4-3
    m4-10
    m4-30
    m4-100

    any vba can help? it cant be solve using sort
    Isaac Koh

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Ascending Order

    you could setup a hidden column and sort on that column
    at the moment its sorting by text

    try in a new cell

    =value(mid(Cell, 4,20))
    and then sort on the new column
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    01-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Ascending Order

    Quote Originally Posted by etaf View Post
    you could setup a hidden column and sort on that column
    at the moment its sorting by text

    try in a new cell

    =value(mid(Cell, 4,20))
    and then sort on the new column
    tq for your reply, but actually i still have other value like M3-1 , M3-4, M3-10.. i cant use your method to solve it

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Ascending Order

    so long as the first characters
    M?- is only 3 characters , then it will work

  5. #5
    Registered User
    Join Date
    01-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Ascending Order

    Quote Originally Posted by etaf View Post
    so long as the first characters
    M?- is only 3 characters , then it will work
    not really understand..can explain in detail??

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Ascending Order

    i'm removing the first 3 characters - so it will work for M3- M4- anything with 3 characters

    and if you always have a - before the number , then we can change so it can work with any text string length -

    give it a try and see what happens

  7. #7
    Registered User
    Join Date
    01-04-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    33

    Re: Ascending Order

    nope.. m3-10, m4-10.. this kind of condition will be duplicated right??

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Ascending Order

    OK , I see what you mean
    so then i guess a VBA solution would be better
    although 2 helper columns
    one with
    =left(cell,2)
    and the second
    =value(mid(Cell, 4,20))

    and custom sort 1st column and then add 2nd column as next level sort
    then you get

    M3-10
    .
    .
    M4-10
    .
    .
    M5-10
    etc

+ 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. Ascending Order
    By isaackoh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2014, 06:49 AM
  2. [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
  3. ascending order
    By cbian in forum Excel General
    Replies: 2
    Last Post: 06-05-2008, 07:26 AM
  4. Ascending order and IF
    By kookinuttz in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-07-2007, 08:27 AM
  5. [SOLVED] Digits in ascending order ?
    By toyota58 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-03-2006, 02:50 PM

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