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

Tips.Net > ExcelTips Home > Sorting > Creating a Sort Order

Creating a Sort Order

Summary: If you have special sorting needs, Excel can help you out. It will even allow you to create custom non-standard sorting orders. This tip explains how you can do that, and how that feature can benefit the work you do. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, and Excel 2003.)

There are times when a normal sorting order just doesn't cut it. Instead, you need a special sorting order that fits the type of data you are working with. In the previous tip you learned that you can instruct Excel to sort by a special sorting order, such as days of the week. You can also easily create your own sorting orders.

For instance, let's assume you have a field that can contain the name of one of four colors--Black, Red, Green, and Orange--and that you wanted your list sorted in that order. The problem is, Excel would normally sort this list alphabetically--Black, Green, Orange, and Red. The solution is to create a custom list that has the colors in the order you desire.

To create a custom list follow these steps:

  1. Select Options from the Tools menu. Excel displays the Options dialog box.
  2. Make sure the Custom Lists tab is selected. (Click here to see a related figure.)
  3. Select the NEW LIST option from the Custom Lists list.
  4. In the List Entries portion of the dialog box, start typing the order in which you want the elements sorted. Thus, for this example, you would type the following in the List Entries area:
Black
Red
Green
Orange
  1. Make sure you press Enter at the end of each element, and that what you type matches exactly the possible contents of the sorting field.
  2. When you are done, click the Add button.
  3. Repeat steps 3 through 5 to define any other lists desired.
  4. Click OK to finish.

Once your lists are defined, you can use them to sort with as described in the previous tip.

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


Step Up and Take Control! Subscribers to ExcelTips know just how valuable a resource it is. ExcelTips Premium provides twice the number of exceptional, easy-to-understand tips every week in an ad-free newsletter, as well as substantial discounts on ExcelTips archives and e-books.
 
Check out ExcelTips Premium today!

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pest 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.)