Download Practice Workbook
Download the free Excel worksheet.
Example 1 – Sort in Ascending Order
- To sort the dataset in Ascending order according to the Writer Names, select any cell in the Writer column and go to Data Tab > Sort & Filter Group > Sort A to Z.
- The dataset is sorted.
Example 2 – Sorting in Descending Order in Excel
- To sort the dataset in descending order according to Quantity Sold, select any cell in the Quantity Sold column and go to Data Tab > Sort & Filter > Sort Z to A.
- The dataset is sorted.
Example 3 – Custom Sorting
The Characteristics column was added to the dataset.
The books that sold more than 25 copies are Best Sellers, the books that sold more than 15 but less than 25 copies are classified as Midlist, and the books that sold less than 15 copies are classified as Backlist.
- Sort the books according to their Characteristics.
- Go to File > Options > Advanced.
- Choose Edit Custom Lists.
- In Custom Lists, click Import List.
- The list will be shown in the List Entries.
- Click OK to add the list to the custom list options.
- Select any cell in the Characteristics column and go to Data Tab > Sort & Filter Group > Sort.
- Select Characteristics as Column.
- Select Custom List in Order.
- Select the custom list and click OK.
- Click OK in the sort window.
The dataset is sorted.
Example 4 – Sorting with Multiple Levels
- Go to Data Tab > Sort & Filter Group > Sort.
- Select Writer as Column and the order as A to Z.
- Click Add Level and select Book as Column and the order as A to Z.
- Click OK to sort the dataset.
The dataset is sorted.
Example 5 – Using a Filter to Sort Data
- Select any cell in the dataset and go to Data Tab > Sort & Filter > Filter.
The headers will display a down arrow.
- Select the down arrow of the column you want to sort. Here, Sort Z to A in the Book column.
The dataset is sorted.
Example 6 – Sort by Color
The best-sellers are colored green and the backlist books are colored yellow.
- Select any cell in the books column and go to Data Tab > Sort & Filter Group > Sort.
- Select Book as Column and Cell Color in Sort On.
- Select Green in Order.
- In the dropdown list, select On Top to show green colored books on top.
- Copy this level by clicking Copy Level.
- For Yellow, select On Bottom.
- Click OK to sort the dataset.
The dataset is sorted,
Things to Remember
- Make sure there are no blank cells in the column that you want to sort.
- If the column headers are in the same format as the dataset, they will be sorted. Select data without headers.
- Merged cells in the dataset may lead to unexpected results.
Frequently Asked Questions
If I have duplicate entries in my dataset, how will Excel sort them?
A: Excel does not sort duplicates in any particular order. The data that occurs first will be shown first.
How to Sort in Excel: Knowledge Hub
- Sort in Ascending Order
- Sort Data by Value
- Sort by Color
- Sort Data Using Formula
- Advantages of Sorting Data
- Sort Alphabetically and Keep Rows Together
- Sort Rows
- Sort Multiple Rows
- Sort Rows by Column
- Sort Rows by Date
- Sort Data by Row Not Column
- Sort Alphabetically with Multiple Columns
- Sort Column by Value
- Sort Columns Without Mixing Data
- Sort Data by Two Columns
- Sort Multiple Columns
- Sort Multiple Columns Independently of Each Other
- Sort by Column to Keep Rows Together
- Sort Two Columns to Match
- Sort by Column without Header
- Sort Numbers
- Sort by Number of Characters
- Sort by Date
- Sort Dates in Chronological Order
- Sort Excel Sheet by Date
- Sort by Month
- Sort by Date and Time
- Sort Dates by Month
- Sort Dates by Year
- Sort Dates by Month and Year
- Sort Birthdays by Month and Day
- Sort by Last Name
- Perform Custom Sort
- Create Custom Sort List
- Perform Random Sort
- Sort Unique List
- Sort Duplicates
- Sort and Filter Data
- Sort and Ignore Blanks
- Sort IP Address
- Sort Drop Down List
- Use Shortcut to Sort Data
- Sort Merged Cells
- Sort Merged Cells of Different Sizes
- Sort Alphanumeric Data
- Auto Sort Multiple Columns
- Auto Sort When Data Is Entered
- Auto Sort When Data Changes
- Auto Sort Table
- Auto Sort without Macros
- Add Sort Button
- Use SORT Function in Excel VBA
- VBA to Sort Column
- Sort Multiple Columns with VBA
- Sort Array with Excel VBA
- Sort Range Using VBA
- Sort ListBox with VBA
- VBA to Sort Table
- Sort Excel Tabs
- Perform Advanced Sorting
- Sort Not Working
- Sort by Date Not Working
- Sort and Filter Not Working
- Excel Not Sorting Numbers Correctly
- Excel Sort by Cell Color Not Working
- Sort by Name
Conclusion
We hope you find this article useful in solving your problems regarding sorting in Excel. Sorting is frequently used in Excel to make the dataset visually appealing. Go over the methods described here to get a better understanding of how to sort in Excel.
<< Go Back to Learn Excel
Get FREE Advanced Excel Exercises with Solutions!