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.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Need to sort all the data in a table? Here's the fastest and easiest way to do it.
Discover MoreWhen formatting the layout of your worksheet, Excel allows you to easily merge adjacent cells together. This can cause ...
Discover MoreSorting is one of the basic operations done in a worksheet. If your sorting won't work and you instead get an error ...
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