Written by Allen Wyatt (last updated July 29, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
Stephanie often has to perform sorts of her data using the same criteria over and over again. For instance, she often needs to perform a sort that uses the same four columns. She wonders if there is a way to "store" a set of sorting criteria so she doesn't need to enter them over and over again.
There are a couple of ways that you can approach this issue. The first is to create multiple custom views (described in other issues of ExcelTips) that include your data sorted in a desired manner. You would need to create one custom view for each of the sorting criteria you use. You can always store and recall the view to see it sorted as you want.
You could also make sure the data in your worksheets is defined as a formal data table. All you need to do is select a cell in the data and press Ctrl+T or display the Insert tab of the ribbon and click the Table tool. Once the data table is set up and you sort it, Excel stores the sorting criteria with the workbook so it is available when you later work with the table.
Perhaps the most flexible approach, however, is to perform your sorting in a macro instead of by using the Sort dialog box. You can easily use the macro recorder to set up and execute your sort; later running the macro will sort the same area over again, using the same criteria.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8346) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Storing Sorting Criteria.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 365 applications with VBA programming. Written in clear terms and understandable language, the book includes systematic tutorials and contains both intermediate and advanced content for experienced VB developers. Designed to be comprehensive, the book addresses not just one Office application, but the entire Office suite. Check out Mastering VBA for Microsoft Office 365 today!
When you sort data in a worksheet, you don't need to sort everything at once. You can sort just a portion of your data by ...
Discover MoreWhen you sort your data, you should always check to see if the sort was done correctly. What if sorting messes up ...
Discover MoreCustom lists are handy ways to enter recurring data in a worksheet. Here's how you can import your own custom lists from ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2024-07-30 00:30:56
Philip
Custom Views ... won't work if there's even one Table in your Workbook. A bug that's been around since the beginning of time ...
2021-01-25 09:54:21
Mary
I find the best way to store sorted data is using Excel's power query.
2021-01-23 14:56:34
ron
There is another option. Do the sort in PowerQuery. Sort order is saved as one of the steps in the Query.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments