In Excel, you can take tables or ranges of data and sort them into different orders. For example, you can sort text alphabetically; numbers by size; dates and times chronologically; cells or fonts by color or icon; or you can create a custom sort. Usually you sort by column, but you can also sort by row.
If you want to sort by more than one column, you need to use a custom sort. For example, you can sort first by the last name column, then by first name. That way, all the Andersons will be listed before the Bakers, and Andy Anderson will come before Bill Anderson.
Click the Sort & Filter button on the Home tab.
Select Custom Sort.
The Sort dialog box appears.
Select the first column you want to sort by.
To sort by cell or font color, or by icon, click the Sort On list arrow and select an option.
Select a sort order.
The options for the Order change depending on what you choose for the Sort by variable.
To sort by an additional column, click the Add Level button.
Select the next column you want to sort by.
Select a sort order.
Repeat these steps as necessary to sort by additional columns.