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.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
If you have some data in a worksheet that is bold, you may want to sort that data based on the text attribute. This is ...
Discover MoreIf you use Excel to maintain a list of text strings (such as movie, book, or product titles), you may want the program to ...
Discover MoreClick the Sort tool in Excel, and you may be surprised that the data in your worksheet is jumbled. In order to sort ...
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