- Click a cell in the column you would like to sort by.
- Click Sort Ascending or Sort Descending .
Note In a PivotTable report, Microsoft Excel uses the selected field to sort.
For best results, the range you sort should have column labels.
- Click a cell in the range you want to sort.
- On the Data menu, click Sort.
- In the Sort by and Then by boxes, click the columns you want to sort.
- Select any other sort options you want, and then click OK.
- Click a cell in the range you want to sort.
- On the Data menu, click Sort.
- In the first Sort by box click the column of least importance.
- Click OK.
- On the Data menu, click Sort.
- In the Sort by and Then by boxes, click the other 3 columns you want to sort, starting with the most important.
- Select any other sort options you want, and then click OK.
Sort rows by months or weekdays
- Select a cell or range you want to sort.
- On the Data menu, click Sort.
- In the Sort by box, click the column you want to sort.
- Click Options.
- Under First key sort order, click the custom sort order you want, and then click OK.
- Select any other sort options you want, and then click OK.
Use your own data as the sort order
-
In a range of cells, enter the values you want to sort by, in the order you want them, from top to bottom. For example:
Data High Medium Low -
Select the range.
-
On the Tools menu, click Options, and then click the Custom Lists tab.
-
Click Import, and then click OK.
-
Select a cell in the range you want to sort.
-
On the Data menu, click Sort.
-
In the Sort by box, click the column you want to sort.
-
Click Options.
-
Under First key sort order, click the custom list you created. For example, click High, Medium, Low.
-
Click OK.
-
Select any other sort options you want, and then click OK.
Note You can't use a custom sort order in a Then by box. The custom sort order applies only to the column specified in the Sort by box. To sort multiple columns by using a custom sort order, sort by each column separately. For example, to sort by columns A and B, in that order, first sort by column B, and then specify the custom sort order by using the Sort Options dialog box. Next, sort the range by column A.
Most of the time, you sort rows. This procedure sorts the order of columns.
- Click a cell in the range you want to sort.
- On the Data menu, click Sort.
- Click Options.
- Under Orientation, click Sort left to right, and then click OK.
- In the Sort by and Then by boxes, click the rows you want to sort.
Note When you sort rows that are part of a worksheet outline, Microsoft Excel sorts the highest-level groups (level 1) so that the detail rows or columns stay together, even if the detail rows or columns are hidden.