Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Sorting a Range of Cells.

Sorting a Range of Cells

Written by Allen Wyatt (last updated November 3, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


1

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. (See Figure 1.)
  3. Figure 1. The Sort dialog box.

  4. Using the Sort By drop down list, choose Column D.
  5. Make sure the No Header Row radio button is selected.
  6. Click on OK.

You can also sort by using the Sort Ascending or Sort Descending tools on the toolbar. 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.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2708) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Sorting a Range of Cells.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Changing Many Link Locations

Word makes it easy to establish links between documents. If you need to change the locations for a lot of links at once, ...

Discover More

Embedding Fonts in a Document

Fonts are essential to getting your text to look just the way you want it to look. If you have a font that you use in a ...

Discover More

Adding Pop-Up Documentation to a Cell

Want to have a small help screen pop up when a user selects a particular cell? This can be done by using data validation, ...

Discover More

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

More ExcelTips (menu)

Performing Complex Sorts

One way you can easily work with data in a worksheet is to sort it into whatever order you find most helpful. Excel ...

Discover More

Storing Sorting Criteria

Need to do the same sorting operation over and over again? Excel doesn't provide a way to save your sorting criteria, but ...

Discover More

Moving Cell Borders when Sorting

Sort your data and you may be surprised at what Excel does to your formatting. (Some formatting may be moved in the sort ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is nine minus 1?

2022-10-28 09:58:00

Jesse

Is there a way to group rows which have selected cells after finding them with the CTRL F "Find All".

EX: I have a Sheet with 2300 rows and columns to "AA". Using CTRL F- All and selecting all with the word "Jeep" in the bottom box, I know have a column with 12 cells selected. I would like to group just those 12 rows together so that I can copy them onto their own Sheet.

What is the most expeditious way to accomplish this?

Thank you


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.