
Click the Add Level to add another rule to the sort. Now the data range is sorted by descending Total Sales, with all rows kept together. When sorting, you can select a Custom List to be the order in which a list is sorted. In the pop-up window, check Data has header row, choose Total Sales under the Sort by menu, select Z → A, and click Sort.Select the data range you want to sort (B2:G9), and go to Data > Sort range.Sort and Keep Rows Together in Google Sheets Note: When you’re working with a table or filtered range, all rows are kept together automatically, and there is no need to expand the selection. This technique works for any sort, including sorting by date or sorting alphabetically. In the Sort Warning window, select Expand the selection, and click Sort.Īlong with Column G, the rest of the columns are also sorted, so all rows are kept together.Then in the Ribbon, go to Home > Sort & Filter > Sort Largest to Smallest. Select Column G (click on the letter G in the column heading).In this example, you have data in Columns B–G, and you want to sort it by Total Sales (Column G) from largest to smallest.


When sorting data by a column in Excel, you must expand the selection to keep rows together. This tutorial demonstrates how to keep rows together during a sort in Excel and Google Sheets.
