Excel has Advanced Sorting options that can help you to perform multi-level sorting within a large database. Sometimes alphabetical or numerical sorting do not suffice. In such cases, Advanced Sorting options are required. In this article, you are going to learn several effective techniques for Advanced Sorting in Excel.
Download Practice Workbook
You can download the following practice workbook to practice while you are reading this article.
9 Examples of Advanced Sorting in Excel
In most cases, you must sort a single column or row. But there are some other cases where you might have to perform Sorting two-column or more than two columns. In such cases, Advanced Sorting Options become convenient.
We are going to discuss three Advanced Sorting Options in this article. These are given below.
- Sort top to bottom
- Sort left to right
- Multi-level sorting
- Case-sensitive sorting
- Sorting based on cell color and font color
- Sorting using conditional formatting
- Using a custom list
- Using SORT, and SORTBY functions
Before discussing these options look at the dataset below.
1. Sorting Top to Bottom
- First, select a column that you want to sort. Say, for example, we select Column C for sorting.
- Then, press the Data tab. Click on that tab & the Advanced Sorting option appears.
- If you press the option marked red, the Sort Warning menu appears.
- Click on the Expand the selection option and press the Sort button.
- Then, the ascending alphabetical order of Column C appears.
2. Sorting from Left to Right
Prices of different types of shirt sizes are given in the chart. We want to sort these shirt sizes according to the ascending alphabetical order from left to right.
- Select Rows 4 to 6 and press the Data bar. Now the Sort option appears.
- We untick the My data has headers option.
- Then, click on the Options button.
- Choose Sort left to right option from the Sort Options window.
- Click on that Sort by button and select Row 4 among all the options, Cells Values as Sort On and A to Z as Order.
- Look at the dataset. The ascending alphabetical order of row 4 from left to right appears.
3. Multi-Level Sorting in Excel
If you want to sort multiple columns of a large database under specific conditions, you can do it by using the Advanced Sorting option in Excel. Consider the column used in method 1.
- Press on the data bar and click Sort. A menu bar appears. Select Sort by option & click Region. Click the Order option and select A to Z.
- Now click the Add Level button and another option Then by appears. Select the Sales volume option & click the Largest to Smallest option in the order menu.
- Press Ok. Then you can get the alphabetic order of the region with the largest to smallest sales volume.
4. Case Sensitive Sorting
In this section, we will sort data from the Product column. This column has the same product name with a case difference. We have to sort them out.
- Select the whole dataset. As we want to sort and then go to the Data tab and click Sort as shown before.
- Then, choose Product as Sort by, Cell Values with Sort On, and A to Z as Order fields.
- Click on the Options button.
- Mark on the box of the Case sensitive.
- Then, click on OK on the two windows.
- Result of the Case Sensitive sorting appears.
5. Sorting Based on Cell Color and Font Color
Assume, our data is filled with a different color. So, we want to sort this data based on cell color or font color.
- We go to Data => Sort.
- Now, customize the Sort window.
- Press Sort by => Region, Sort On => Cell Color, Order=> Choose any color.
- Finally, press OK.
We added three levels for three cell colors.
- Column D appears as a Color Sorting.
6. Advanced Sorting by Using Conditional Formatting
In this section, we will use Conditional Formatting and then apply the sort operation.
- Select Column E. Press Conditional Formatting => Data Bars.
- Choose a color from the Solid Fill section.
- We can see bars are added with the data.
- Now, go to Data => Sort Largest to Smallest.
- Choose Expand the selection from the Sort Warning window.
- Finally, click on the Sort option.
- Sorting based on Color Formatting appears based on sales values in descending order.
7. Sorting Based on a Custom List
Let’s Sales volumes less than 40 are marked with low performance. Sales volumes greater than 40 but less than 60 are marked with medium performance. Sales volumes greater than 60 are marked with high performance.
- Choose the data range first.
- Press Sort & Filter => Custom Sort option.
- Press Sort by => High Medium Low option =>ADD.
- Click on the OK button then.
- Dataset is arranged with the Sales performance column.
8. Sorting by Using SORT Function
In this section, we will use a formula based on the SORT function to sort data in Excel. We will sort the data of Column E on Column F. To do that, put the following formula on Cell F5 to sort the whole column.
We can see data sorted in ascending order.
9. Excel SORTBY Function for Advanced Sorting
Here, we will use the SORTBY function for advanced data sorting.
- Look at the dataset.
- We can see our dataset is divided into two parts. 1st one is before sorting, and the 2nd one is after sorting.
- Now, put the following formula on Cell F6.
We can see data has been sorted considering the Sales Volume column in descending order.
So, we learned how to sort data by using Advance Sorting Options. I hope you find this article quite helpful. Feel free to ask questions or share your opinion in the comment section. Please have a look at our website ExcelDemy for further problems.
- How to Auto Sort Multiple Columns in Excel (3 Ways)
- Auto Sort When Data is Entered in Excel (3 Methods)
- How to Sort Two Columns in Excel to Match (Both Exact and Partial Match)
- How to Sort Multiple Columns in Excel Independently of Each Other
- How to Sort Data in Excel Using Formula
- Sum Using OFFSET and MATCH in Excel (With Alternative Options)