How to sort more than three columns in Excel (268007)
The information in this article applies to:
- Microsoft Office Excel 2003
- Microsoft Excel 2002
- Microsoft Excel 2000
- Microsoft Excel 97 for Windows
This article was previously published under Q268007 SUMMARY
Microsoft Excel limits you to a maximum of three columns or fields when you sort a list. If you want to sort a list of more than three fields, you must sort multiple times, with three or fewer fields at a time. Also, you must sort the fields in the reverse order of their importance in the sort.
This step-by-step article contains an example of how to sort a list by more than three fields.
back to the top
How to Sort More Than Three Columns
The following example creates and sorts a list that contains four fields: manager, employee, amount, and year. The year field is the least important field, so you sort it first.
- Start Excel.
- Type the following data in Sheet1:
A1: Manager B1: Employee C1: Amount D1: Year
A2: Bob B2: Mark C2: 1 D2: 1999
A3: Sue B3: Jane C3: 1 D3: 1995
A4: Bob B4: Paul C4: 1 D4: 1993
A5: Bob B5: Paul C5: 1 D5: 1999
A6: Sue B6: Jane C6: 2 D6: 1998
A7: Sue B7: Mary C7: 2 D7: 1993
A8: Bob B8: Paul C8: 2 D8: 2000
A9: Sue B9: Jane C9: 1 D9: 1999
A10: Bob B10: Paul C10: 1 D10: 1991
A11: Sue B11: Jane C11: 1 D11: 1990
- Select cell A1.
- On the Data menu, click Sort.
- In the Sort dialog box, click Year in the Sort by list
- In the first Then by list, click (none).
- In the second Then by list, click (none).
- Click OK.
The list is now sorted by year (the fourth, or least important, field). - On the Data menu, click Sort again.
- In the Sort dialog box, click Manager (the first, or most important, field) in the Sort by list.
- In the first Then by list, click Employee (the second-most important field).
- In the second Then by list, click Amount (the third-most important field).
- Click OK.
The list is now sorted first by manager, then by employee, then by amount, and then by year:
A1: Manager B1: Employee C1: Amount D1: Year
A2: Bob B2: Mark C2: 1 D2: 1999
A3: Bob B3: Paul C3: 1 D3: 1991
A4: Bob B4: Paul C4: 1 D4: 1993
A5: Bob B5: Paul C5: 1 D5: 1999
A6: Bob B6: Paul C6: 2 D6: 2000
A7: Sue B7: Jane C7: 1 D7: 1990
A8: Sue B8: Jane C8: 1 D8: 1995
A9: Sue B9: Jane C9: 1 D9: 1999
A10: Sue B10: Jane C10: 2 D10: 1998
A11: Sue B11: Mary C11: 2 D11: 1993
back to the top
REFERENCES
For more information about sorting, click Microsoft Excel Help on the
Help menu, type sort a list in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
back to the top
Modification Type: | Major | Last Reviewed: | 8/13/2004 |
---|
Keywords: | kbHOWTOmaster KB268007 |
---|
|