Secondary Sorts in Tables

Davidns

Board Regular
Joined
May 20, 2011
Messages
119
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!
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,532
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
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.
 

Davidns

Board Regular
Joined
May 20, 2011
Messages
119
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!
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,532
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Use the drop downs but sort by name first, then priority. That will produce the order you want
 

Davidns

Board Regular
Joined
May 20, 2011
Messages
119
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?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,532
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
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.
 

Davidns

Board Regular
Joined
May 20, 2011
Messages
119
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?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,532
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
No, it should still work - does it not?
 

Davidns

Board Regular
Joined
May 20, 2011
Messages
119
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.
 

Forum statistics

Threads
1,085,522
Messages
5,384,187
Members
401,885
Latest member
nirmalpatel85

Some videos you may like

This Week's Hot Topics

Top