Excel – How to Sort Multiple Rows and Columns


To totally unlock this section you need to Log-in


Login
With Microsoft Excel's powerful sorting capabilities, you can enter unsorted data and let the software sort your data numerically, alphabetically or chronologically. You can sort all the rows in a worksheet by sorting the values in one column, simplifying the task of alphabetizing a list of employees by last name or reordering a list of customer transactions by invoice value. To deepen the value of a sorting process, use Excel to sort by more than one criterion at a time.

Step 1

Click on the "Select All" button at the intersection of your row and column headings. The cells in your worksheet highlight to confirm they're selected. (Or use one of the methods showed in Select Actual Used Range in Excel worksheet)

Step 2

Switch to the "Data" tab in the Microsoft Excel ribbon and locate the "Sort & Filter" group. Click on the "Sort" option.

Excel - How to Sort Multiple Rows and Columns

Excel - How to Sort Multiple Rows and Columns

Step 3

Click on the "Sort By" drop-down menu to select a column by name. The names correspond to the headings typed in the first row of your data. The column you choose first should represent your primary sorting criteria. For example, if you want to sort an employee list by column headings "Hire Date," "Last Name" and "First Name", in that order, then the first column you select should be "Hire Date".

Excel - How to Sort Multiple Rows and Columns

Excel - How to Sort Multiple Rows and Columns

Step 4

Click the "Sort On" drop-down menu and choose a sort criterion for this column. In the example above, select "Values" to sort by the dates in the cells.

Step 5

Click on the "Order" drop-down menu to select a sorting method. To sort the hire dates from earliest to most recent, choose "Oldest to Newest".

Step 6

Click on the "Add Level" button at the top of the Sort dialog box to add a second sorting criterion. Set the "Sort By" drop-down menu to "Last Name".

Excel - How to Sort Multiple Rows and Columns

Excel - How to Sort Multiple Rows and Columns

Step 7

Click the "Sort On" drop-down menu to select a sort criterion for this column. Continuing the above example, select "Values" to sort by the last names in the cells.

Step 8

Click on the "Order" drop-down menu to select a sorting method. To sort the last names alphabetically in ascending order, choose "A to Z".

Step 9

Click on the "Add Level" button at the top of the Sort dialog box to add a third sorting criterion. Set the "Sort By" drop-down menu to "First Name".

Step 10

Click the "Sort On" drop-down menu to select a sort criterion for this column. Continuing the example above, select "Values" to sort by the first names in the cells.

Step 11

Click on the "Order" drop-down menu to select a sorting method. To sort the first names alphabetically in ascending order, choose "A to Z".

Step 12

Click on the "OK" button at the bottom right of the dialog box to sort your data. The columns rearrange but the cells in individual rows remain intact, preserving the employees' identities.

[tweet]

Tips

The "Order" list displays context-sensitive criteria depending on the type of information you are sorting, which is defined by the formatting type applied to the cells.
Excel usually recognizes whether or not your worksheet has column headers. If your data starts in row A, uncheck the "My Data Has Headers" option.
If your worksheet doesn't use headers, the list in the "Sort By" menu uses column references to identify your choices.
Use the arrows in the Sort dialog box to reorganize your sort criteria in a different order from the one in which you added them.
Turn off any filters that hide some of your rows or columns and then perform your sort. Sorting skips hidden data.

Warning

Unlike Excel's data-filtering processes, its sorting function permanently rearranges your data unless you undo the results.