Numbers are sorted from the smallest negative number to the largest positive number.
Sorting alphabetically When sorting text items alphabetically, Excel sorts them character by character from left to right. For example, if a cell contains the text "A 100", it will be arranged after the cell containing "A 1" and before the cell containing "a1/".
Text and text containing numbers are sorted in the following order:
0 1 2 3 4 5 6 7 8 9 (space)! " # $ % & amp( ) * , ./ : ; ? @[\]^ _ ` { | } ~+& lt; = & gtA B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Apostrophe (') and hyphen (-) are ignored. The exception is that if the two text strings are the same except the hyphen, the hyphenated text will be ranked last.
Logical value is in logical value, and false comes before true.
Error Values All error values have the same priority.
Sort the rows in ascending order (A to Z, or 0 to 9) or descending order (Z to A, or 9 to 0).
Click any cell in the data column that you want to sort.
Click Sort Ascending or Sort Descending.
Note that in the PivotTable report, Microsoft Excel sorts the selected fields.
Sort rows (columns) by 2 or 3 criteria.
For best results, the range to be sorted should contain column labels or titles.
Click any cell in the range you want to sort.
On the Data menu, click Sort.
In the Primary Key and Secondary Key boxes, click the column you want to sort, starting with the most important column.
Check the other sorting options you want, and then click OK.
Sort rows (columns) by four criteria.
Click any cell in the range you want to sort.
On the Data menu, click Sort.
In the third keyword box, click the least important data column.
Click "OK".
On the Data menu, click Sort.
In the Primary Key and Secondary Key boxes, click the other three columns to sort, starting with the most important column.
Check the other sorting options you want, and then click OK.
Sort rows by month or week
Click any cell in the range you want to sort.
On the Data menu, click Sort.
In the Primary Key box, click the column you want to sort.
Click "Options".
In the Primary Key Sort Order box, click the custom order you want, and then click OK.
Check the other sorting options you want, and then click OK.
Use custom data as the sort order.
In the cell area, enter the main keywords in a certain order. For example,
data
high
middle
low
Please select the corresponding area.
On the Tools menu, click Options, and then click the Custom Sequence tab.
Click Import and then click OK.
In the range to sort, select any cell.
On the Data menu, click Sort.
In the Primary Key box, click the column you want to sort.
Click "Options".
Under Primary Key Sort Order, click the custom list you created. For example, click High, Medium and Low.
Click "OK".
Check the other sorting options you want, and then click OK.
Note You cannot use a custom sort order in the Secondary Key box. Custom sorting only applies to the specified column in the primary key box. To sort multiple data columns in a custom sort order, you can sort them by column. For example, to sort columns A and B in this order, first sort column B, and then use the Sort Options dialog box to specify a custom sort order. Next, sort the columns by region.
Sort columns instead of rows.
In most cases, you should sort the rows. In the sorting process, it will also be sorted in the order of columns.
Click any cell in the range you want to sort.
On the Data menu, click Sort.
Click "Options".
Under the Direction option box, click Sort by Row, and then click OK.
In the Primary Key and Secondary Key boxes, click the data row that you want to sort.
Note If the data rows to be sorted are part of a hierarchical display of a worksheet, Microsoft Excel will sort the highest-level grouping (the first level). At this point, even if the detail data rows or columns are hidden, they will remain together and will not be sorted.
Sort columns without affecting other columns.
Warning Please use this function with caution. Sorting by a column may produce unexpected results, such as moving cells in that column away from other cells in the same row.
Click the column header to select the column to sort.
Click Sort Ascending or Sort Descending.
Displays the sort warning dialog box.
Select Sort by current selection.
Click Sort.
If the result is different from expected, click Undo.
To annotate ...
To exclude the first row of data from sorting because it is a column header, on the Data menu, click Sort, and then under My Data Area, click Header Row.
To perform case-sensitive sorting, on the Data menu, click Sort, click Options, and then select Case-sensitive.
To find the maximum or minimum value in a certain area (such as the top 10 grades or the last 5 sales), you can use automatic filtering. For more information, see Filtering Areas.
Spaces are always at the end.