Results 1 to 9 of 9

Thread: Secondary Sorts in Tables
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    May 2011
    Posts
    119
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Secondary Sorts in Tables

    I am familiar with using Custom Sorts for secondary sorts in tables. However, I was wondering if there is an easier way. Generally, one can simply click on the drop down arrow in a column header while holding the control key to designate it as a secondary sort, but that doesn't seem to work in Excel. Is there something similar available in Excel, or an easier approach than going into the Sort and Filter menu, choosing Custom, then clicking Ok?

    Also, is there a way to manually move a row within a sort, like there is in pivot table?

    Thanks!

  2. #2
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    33,815
    Post Thanks / Like
    Mentioned
    48 Post(s)
    Tagged
    6 Thread(s)

    Default Re: Secondary Sorts in Tables

    You can just apply the sorts in reverse order to get the same effect.

    For the second question, yes you can move rows in a table, whether sorted or not, by shift dragging.

  3. #3
    Board Regular
    Join Date
    May 2011
    Posts
    119
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Secondary Sorts in Tables

    Thanks Rory,
    The shift dragging works great, much appreciated.
    On the first question, I am not following you so perhaps I wasn't clear. I am looking for an easy solution to secondary sorting. For example, I have a column called Priority and one called Name. I want to sort by Priority, and then by Name. Currently, this seems to require going into the Custom Sort menu. I would like to know if there is an easier way. Thanks!

  4. #4
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    33,815
    Post Thanks / Like
    Mentioned
    48 Post(s)
    Tagged
    6 Thread(s)

    Default Re: Secondary Sorts in Tables

    Use the drop downs but sort by name first, then priority. That will produce the order you want

  5. #5
    Board Regular
    Join Date
    May 2011
    Posts
    119
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Secondary Sorts in Tables

    Well, that's the issue - if I use the drop downs, choosing a second one seems to overwrite the first one. The only way to have a secondary sort seems to be via the Custom Sort menu. Do I need to press something concurrent with clicking on the drop down button in order to ensure it understands to treat that column as a secondary sort?

  6. #6
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    33,815
    Post Thanks / Like
    Mentioned
    48 Post(s)
    Tagged
    6 Thread(s)

    Default Re: Secondary Sorts in Tables

    Because of the way Excel sorts, if you sort by name first and then priority, you should end up with the same result as a primary sort by priority and then name as secondary. If you aren't, I'd need to see the file.

  7. #7
    Board Regular
    Join Date
    May 2011
    Posts
    119
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Secondary Sorts in Tables

    interesting, but my sort is based on column called Primary and one called Secondary, both of which are numerical. Thus, am assuming I am stuck with the Custom Sort method?

  8. #8
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    33,815
    Post Thanks / Like
    Mentioned
    48 Post(s)
    Tagged
    6 Thread(s)

    Default Re: Secondary Sorts in Tables

    No, it should still work - does it not?

  9. #9
    Board Regular
    Join Date
    May 2011
    Posts
    119
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Secondary Sorts in Tables

    seems to be resulting in inconsistencies. Also, there is no visual clue showing the secondary sort. I think the workaround I just did is a bit clearer - I made a ribbon shortcut for Custom Sort and now just clicking on it shows me the sorts, and then I am one Enter click away to implement the sort. At that point, both sorts are done and both columns show the sort indicator (although ideally it should show which one is the primary).
    Thanks for helping me out. Seems like a small issue, but ultimately will save me time.

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •