+ Reply to Thread
Results 1 to 2 of 2

Sorting Columns by Specific Values

  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Leicester, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Sorting Columns by Specific Values

    Hi Everyone,

    I have a list of data that I want to sort in two different ways according to whether the start locations are odd
    or even. I could do with wrting a macro for this but not sure where to start.

    Excel Forum Pic 2.png

    If start locations are odd then I want the relevant rows to be sorted by the next column (the end location) in decending
    order.

    If they are even then I want the relevant rows to be sorted by the next column (the end location) in ascending
    order.

    Any ideas?

    I've tried recording a macro using sorts but I can't seem to specify the odd/even part and this also only seems to work
    for a fixed number of rows, where as in my example, the number of rows will be variable.

    Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Sorting Columns by Specific Values

    Quote Originally Posted by Tony Morgan View Post
    ...I want to sort in two different ways....

    If start locations are odd then I want the relevant rows to be sorted by the next column (the end location) in decending
    order.

    If they are even then I want the relevant rows to be sorted by the next column (the end location) in ascending
    order.
    Do you mean that you want to have two different sorts with two different sets of results, and you only use one at a time? Or that you want to sort a single time, but using different criteria for different rows?

    In would be extremely helpful if you could show an example of the result that you are looking for based on the sample you attached. By the way screenshots are of very limited help here because we can't experiment with it or post a solution built into your own file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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