How can we help you?

You can run the multi-level sorting using the Custom sorting window.

Open the Custom sorting window

To open the Custom sorting window for the selected range, follow the steps below:

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 sorting_asc Sort button. In the drop-down list, select Custom sorting.

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

The appearance of the sorting_asc Sort button depends on the last command invoked using it and may differ from the one shown here.

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

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

3.If the Sort cells window appears with a suggestion to add adjacent cells to the range:

Select Add the data and sort if you want to add adjacent cells to the current range, and click OK.

Select Ignore the data if you want to apply sorting only to the selected range, and click OK.

Data in columns or rows that are not included in the sort range may no longer match the sorted data after sorting, and the spreadsheet structure may be disrupted.

To open the Custom sorting window for the filter range, follow these steps:

1.Click editor_filter_on_drop_active Sort and filter 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.

sorting_window_adjustable_sorting

Configure a multi-level sorting

In the Custom sorting window, configure multi-level sorting as follows:

1.Click t_pivot_table_settings Additional settings on the top panel of the window and select the following items from the drop-down menu:

Sort by rows: If you want to sort by rows. Sorting by rows is not available for the range of filtering.

Match case: If you want to take the case of characters into account when sorting by values.

multilevel_sorting_settings_window

2.When sorting columns, 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. This option is only available for the selected range; for filtering ranges, the upper cells of the range are always used as titles.

3.When sorting rows, select the Rows have titles checkbox if you want to use the values in the first column of the selected range as row titles. Titles will not be part of the sorting.

4.Configure the sorting for the first level by selecting the required parameters in the row with it:

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

In the Sort column, select the sort type from the drop-down list.

In the Order column, select the sorting order depending on the selected type.

In the Color/Icon column, select a fill color, font color, or icon.

5.Add the required number of new levels by clicking s_add_tab_icon Add sorting level button on the top panel of the window or duplicate the selected row by clicking the autorecovery_settings_copy Duplicate sorting level. Duplication is convenient to use when the same parameters are used for different levels.

6.Configure the sorting of each new level by selecting the parameters in the corresponding row, similar to the first level (see above).

7.If necessary, you can change the order of the levels or delete unnecessary ones.

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

Was this helpful?
Yes
No
Next
Operations with levels