Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Sorting a Range of Cells.
Written by Allen Wyatt (last updated September 19, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Peter asked if it is possible to sort a range of cells, and just that range. In other words, not to sort entire rows or entire columns. The answer is a resounding "yes," Excel allows you to do the sorting rather easily.
As an example, let's assume you want to sort the cells in the range of C10:F40, based on the values in column D. To do this, follow these steps:
Figure 1. The Sort dialog box.
You can also sort by using the Sort Ascending or Sort Descending tools on the Data tab of the ribbon. The steps you follow are just a bit different:
Regardless of the technique you use, only the range of selected cells is sorted. All other information in the data table remains unaffected.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11101) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Sorting a Range of Cells.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Sort your data and you may be surprised at what Excel does to your formatting. (Some formatting may be moved in the sort ...
Discover MoreUsing the sorting tools, on the toolbar, may result in some unwanted results, such as jumbled data. If this happens to ...
Discover MoreWhen you sort your data, you should always check to see if the sort was done correctly. What if sorting messes up ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2020-09-19 05:04:50
Kiwerry
A big THANK YOU for this one Allen. I have often wondered whether there is a quick way of sorting a range by a column other than the leftmost one, and here it is!
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