Sorting data in excel means sorting data in some synchronized format, there are predefined sorting by excel which depends on the value present in the columns if the column has numerical values then the values are sorted in numerical fashion which is greatest to lowest or we have number filters, sorting can be accessed when we insert filters in columns or from editing section in the home tab using the sort and filter button.
Sorting in Excel (Table of Contents)
What is Sort in Excel
SORT in excel means arranging the data in a determined order. Sometimes we need to arrange the names alphabetically, sort the numbers from smallest to largest, largest to smallest, dates from oldest to latest, latest to oldest etc…
In excel we have an inbuilt tool called SORT option. This sort option can help us to sort the data based on the condition we give.
Where to Find Sort Option in Excel?
In excel SORT option is located under Data tab.
- In order to organize the data, SORT option plays a key role in it. If the monthly sales data is not in order from Jan to Dec, it may not be a proper organizing way of the data structure.
- Excel SORT option will help us to solve all kinds of data to make life easy. In this article, I will demonstrate the usages of SORT option in excel and save a lot of time.
How to Sort Data in Excel?
Sorting Data in Excel is very easy and simple. Let’s take some examples to understand this in a better manner.
Example #1 – Single Level Sorting Data in Excel
This will sort the data based on only one column nothing else.
Now, look at the below data. I have sales of different products by Segment and Country.
I have the data until the 700th row. Download the excel file to follow along with me.
Now I want to sort them based on the Country column from A to Z.
Step 1: Select the data that we want to sort. You can use the shortcut key to select the entire data, select the first row and then click Ctrl + Shift + Down Arrow.
Step 2: Go to Data tab > Sort. The shortcut key to open the sort option is ALT + D + S.
Step 3: Now make sure “My data has headers” checkbox has ticked. If this box has ticked means, the selected data has headers otherwise; your will header will be treated as the data only.
Step 4: Click on Sort by drop-down list and select the word Country.
Step 5: Click on Sort On. Here we can sort based on values, Cell Colour, Font Colour, and Cell Icon.
Step 6: Finally, select the Order. Here you can sort A to Z, Z to A and custom list.
Step 7: Final SORT dialogue box should look like this.
Step 8: Click on OK it will sort the data country-wise alphabetically A to Z.
Example #2 – Multi-Level Sorting Data in Excel
In the previous example, we have learned single level sorting. In this example, I will explain you the process of Multi-level sorting.
Previously I sorted the data country-wise. Assume I want to sort the data Segment-wise, Product-wise, and Units sold from largest to smallest. This requires multi-level sorting.
Step 1: Select the data. (I am using the same data from the previous example)
Step 2: Press ALT + D + S (shortcut key to open the SORT box)
Step 3: First select Segment heading.
Step 4: Now click on Add Level to insert one more layer.
Step 5: From the second layer select Product.
Step 6: Now click on Add Level to add the third layer.
Step 7: From the third layer select Units Sold header.
Step 8: by default, Order will be from Smallest to Largest. Under Order click on the dropdown list and select Largest to Smallest.
Step 9: Both the layers will be sorted alphabetically and Units Sold will be sorted from the largest value to the lowest value.
Firstly, it will sort the data based on the Segment column then will sort by Product and finally by Units sold (largest to smallest).
Example #3 – Sorting Dates Data in Excel
In this example, I will show you how to sort dates data.
I have sales table country-wise at different dates. I want to sort the data country-wise first and then date-wise (oldest to newest)
Step 1: Select the data first.
Step 2: Open sort option. (ALT + D + S)
Step 3: In the first drop-down list select Country-wise header.
Step 4: Click on Add Level to insert one more layer.
Step 5: From the second layer select Date header.
Step 6: by default, orders selected Oldest to Newest. Our objective is to sort from oldest to newest.
Click on OK to sort.
Things to Remember
- We need to select the entire to sort. Otherwise, left out columns will be as it is.
- Make sure my data has headers check has selected to sort the data.
- We can sort the colored cells, colored font etc…
- We sort the data by applying the filter in excel as well.
- We can sort from A to Z, Z to A in case of alphabetic.
- We can sort from Largest to Smallest, Smallest to Largest in case of numbers.
- In case of dates, we can sort from Oldest to Newest, Newest to oldest.
This has been a guide to Sort in Excel. Here we will demonstrate SORT option in excel (Single Level and Multi-Level Sorting) along with excel example and downloadable excel templates. You may also look at these useful functions in excel –
- Excel Custom List
- Adding Filter in Excel – Examples
- Word Count in Excel
- How to Edit Drop-Down List in Excel?
- Shortcut Filter Excel
- Sort by Number in Excel – Examples
- Sort by Color in Excel – Examples
- Remove Blank Rows in Excel
- Remove Duplicates in Excel
- Formatting in Excel
- One Variable Data Table in Excel