+ Reply to Thread
Results 1 to 4 of 4

Sort based on criteria

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Sort based on criteria

    Hello,

    I have thousands of rows of data. I want to sort the rows based on a numeric value. The value to be sorted on will all ways end in zero. How can I sort the a colum so that all the values that end in zero are displayed first then the rest of the values (not ending in zero)

    Where:

    400405
    345902
    300000
    209844
    400000

    Becomes:

    300000
    400000
    209844
    345902
    400405

    Thank you,
    Ron

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

    Re: Sort based on criteria

    Add a column that tests whether the last character is zero, and use that as the primary sort key.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Sort based on criteria

    Thank you. How would I use the MOD command to do that?

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

    Re: Sort based on criteria

    =if(mod(a1,10)=0, 0, 1)

+ 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