Sorting by Columns

Written by Allen Wyatt (last updated September 2, 2023)
This tip applies to Excel 97, 2000, 2002, and 2003


Most sorting in Excel is done by row, meaning that you order the rows based on the contents of a particular column in the information being sorted. At times you may have a need to change the orientation of your sorting, meaning you need to sort columns based on the contents of a particular row.

Excel makes sorting by column easy, although it is not particularly intuitive. Simply follow these steps:

  1. Select the range of cells you want to sort. Make sure you select the column headers in the range.
  2. Choose the Sort option from the Data menu. Excel displays the Sort dialog box. (See Figure 1.)
  3. Figure 1. The Sort dialog box.

  4. Click on the Options button. Excel displays the Sort Options dialog box. (See Figure 2.)
  5. Figure 2. The Sort Options dialog box.

  6. Choose the Sort Left to Right option button.
  7. Click on OK to close the Sort Options dialog box.
  8. Click on OK to sort your data.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2709) applies to Microsoft Excel 97, 2000, 2002, and 2003.

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

Moving Macros from the Personal Workbook

Need to move a macro out of your Personal.xlsb workbook and into a regular workbook? You can do it using familiar editing ...

Discover More

Positioning a Column on the Screen

If you have static columns and dynamic columns on the screen, you may want the dynamic columns to always show a ...

Discover More

Jumping to a Range

Need a quick way to jump to a particular part of your worksheet? You can do it by using the Go To dialog box.

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)

Sorting by Colors

Need to sort your data based on the color of the cell? Excel doesn't include this capability, but you can still do the ...

Discover More

Fixing Odd Sorting Behavior

When you sort data that contains both numbers and text, you may not get exactly the result that you expected. To know ...

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 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.