Excel allows you to sort by multiple columns. To sort by more than one field, use the Sort dialog box. For here, you can choose which columns you want to sort and the order that are to be sorted. Excel 2007 now lets you sort by up to 64 columns (compared to three in previous versions of Excel.)
To Sort a Table by Multiple Columns
- Activate any cell within your table range.
- Click the Data tab on the Ribbon.
- Click the Sort button on the Sort & Filter group on the Data Ribbon.
- Select the field by which you want to sort in the Sort By drop-down list.
- Click the Sort on arrow to select on what to sort (values, cell, color, font color or cell icon).
- Click the Order arrow to choose the sort order.
- To add another level, click the Add Level button. To copy an existing level, click anywhere on the level you want to copy and click the Copy Level button.
- To change the sort order, click the Move Up or Move Down buttons (arrows).
- To delete a sort order, click anywhere on the level and click the Delete button.
- When finished, click OK.