bottom
Great ExcelTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > ExcelTips Home > Sorting > Sorting a Range of Cells

Sorting a Range of Cells

Summary: When you sort data in a worksheet, you don’t need to sort everything at once. You can sort just a portion of your data by using the techniques in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

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:

  1. Select the range of cells.
  2. Choose Sort from the Data menu. Excel displays the Sort dialog box. (Click here to see a related figure.) To display this dialog box in Excel 2007, display the Data tab of the ribbon and then click Sort.
  3. Using the Sort By drop down list, choose Column D.
  4. Make sure the No Header Row radio button is selected. (In Excel 2007, make sure the My Data Has Headers check box is cleared.)
  5. Click on OK.

You can also sort by using the Sort Ascending or Sort Descending tools on the toolbar or, in Excel 2007, on the Data tab of the ribbon. The steps you follow are just a bit different:

  1. Select the range of cells.
  2. Press the Tab key to make sure that column D is selected. You can tell when it is selected because one of the cells in column D will appear in white, rather than being shaded.
  3. Click on Sort Ascending or Sort Descending.

Regardless of the technique you use,. only the range of selected cells are sorted. All other information in the data table remains unaffected.

Tip #2708 applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007


PivotTables Got You Perplexed? Learn the ins and outs of this powerful data-crunching tool. ExcelTips: PivotTables for the Faint of Heart makes it easy.

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home
Vital News Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

 

Great Info!

Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)