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.
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!
Sorting by dates is easy, and you end up with a list that is in chronological order. However, things become a bit more ...
Discover MoreOne way you can easily work with data in a worksheet is to sort it into whatever order you find most helpful. Excel ...
Discover MoreSorting information in Excel is a common task. Sorting information that isn't in the primary order that you need can be a ...
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 © 2024 Sharon Parq Associates, Inc.
Comments