How can we help you?

You can sort by value depending on the type of data contained in the cells:

Text data is sorted in ascending order in alphabetical order, and in descending order in reverse order.

Numerical data is sorted in ascending order from the minimum to the maximum value, and in descending order in reverse order.

The date and time are sorted in ascending order from earlier values to newer ones, and in descending order in reverse order.

Logical data is sorted in ascending order from False to True, in descending order in reverse order.

Errors are sorted in ascending order by error code: #N/A#NUM!#NAME?#REF!#VALUE!#DIV/0!#NULL!, and in descending order in reverse order.

Mixed data is sorted in ascending order as follows: numeric data is sorted first, from minimum to maximum, then text data is sorted from A to Z, then logical data is sorted from False to True, then errors are sorted by error code (see above), then date and time are sorted from earlier values to later values, then cells with no values. In descending order in reverse order.

 

Sort selected range

To sort a selected range by value, follow the steps below:

1.Select the cell range for which you want to perform sorting. Sorting is performed by the leftmost column of the range.

2.Run the sort command in one of the following ways:

On the Home tab, in the Data, click the arrow to the right of the t_data_sorting Sort button and select Sort ascending or Sort descending from the drop-down list.

On the Data tab, click the arrow to the right of the t_data_sorting Sort button and select Sort ascending or Sort descending from the drop-down list.

Right-click any cell in the selected range and select Sort > Sort ascending / Sort descending.

 

You can also sort the selected range by value using custom sorting. To do this, proceed as follows:

1.Select the cell range for which you want to perform sorting.

2.Open the Custom sorting window in one of the following ways:

On the Home tab, in the Data group, click the arrow to the right of the t_data_sorting Sort button. In the drop-down list, select Custom sorting.

On the Data tab, click the arrow to the right of the t_data_sorting Sort button. In the drop-down list, select Custom sorting.

Right-click any cell in the selected range and select Sort > Custom sorting.

Press Ctrl+Shift+R (Windows, Linux) or ⌘Cmd+⇧Shift+R (macOS).

3.In the Custom sorting window:

Select the Columns have titles checkbox if you want to use the values of the upper cells as column titles. Titles will not be part of the sorting.

In the Column column, select the name of the column you want to sort by from the drop-down list.

In the Sort column, select By value from the drop-down list.

In the Order column, select the sorting order: Descending / Ascending or From A to Z / From Z to A.

4.At the bottom of the window, click Apply.

Sort the sort and filter range

To sort the sort and filter range by value, follow these steps:

1.Click editor_filter_on_drop_active Sort and filter in the upper cell of the column you want to sort by.

The upper row of the range is not part of the sorting and filtering.

2.In the Sort and filter window, in the Sort type drop-down list, select By value.

3.Select the sort order using the side_panel_defined_names_sorting Ascending or t_data_sorting Descending options.

4.At the bottom of the window, click Apply.

 

The appearance of the sort and filter button may differ from the one shown here because it depends on whether sorting has been applied before, the sort order (ascending or descending), and whether a filter has been applied:

editor_filter_on_drop_active: No sorting or filtering applied.

filter_applied: Filter applied, no sorting applied.

sorting_ascending_icon: Sorted in ascending order with no filter applied.

sorting_descending_icon: Sorted in descending order with no filter applied.

sorting_ascending_filter_icon: Sorted in ascending order with filter applied.

sorting_descending_filter_icon: Sorted in descending order with filter applied.

 

You can also sort the sort and filter range by value using custom sorting. To do this, proceed as follows:

1.Click the editor_filter_on_drop_active button in one of the top cells of the range.

2.In the Sort and filter window, in the Sort type drop-down list, select Custom sorting.

3.In the Custom sorting window:

In the Column column, select the name of the column you want to sort by from the drop-down list.

In the Sort column, select By value from the drop-down list.

In the Order column, select the sorting order: Descending / Ascending or From A to Z / From Z to A (for text data).

4.At the bottom of the window, click Apply.

 

Was this helpful?
Yes
No
Next
Sort by cell fill color