Excel-13 is a comprehensive guide to sorting data in Microsoft Excel. Explore practical tips, step-by-step instructions, and visual illustrations for sorting data by one or multiple criteria, custom sort orders, color, and more.
📚 Goal: Help you master Excel's sorting features for efficient data management—suitable for beginners and advanced users!
- Sort by One Column
- Sort by Multiple Columns
- Custom Sort Order
- Sort by Color
- Reverse List Order
- SORT and SORTBY Functions
- Screenshots
- Requirements
- Author
-
Click any cell in the column you want to sort.
-
To sort in ascending order, on the Data tab, in the Sort & Filter group, click A→Z.
-
Result:
ℹ️ To sort in descending order, click Z→A.
-
On the Data tab, in the Sort & Filter group, click Sort.
-
Select Last Name from the 'Sort by' drop-down list.
-
Click Add Level.
-
Select Sales from the 'Then by' drop-down list.
-
Click OK.
Result:
Records are sorted by Last Name first and Sales second.
You can use Excel to sort data in a custom order. For example, sort by Priority (High, Normal, Low):
-
Click any cell inside the data set.
-
On the Data tab, click Sort.
-
Select Priority from the 'Sort by' drop-down list.
-
Select Custom List from the 'Order' drop-down list.
-
Type the list entries.
-
Click OK twice.
Result:
-
Click any single cell inside your data set.
-
On the Data tab, click Sort.
-
Sort by Last Name (or another column), sort on Cell Color (or Font Color/Cell Icon), and select the green color for the first level.
-
Click Copy Level two times and select the other colors.
-
Click OK.
Result:
-
Use the SEQUENCE function to generate a list of numbers.
For example:=SEQUENCE(8,1,1,1)
(Requires Excel 2021 or Excel 365)
-
The SORTBY function sorts a range based on values in a corresponding range (use
-1
for descending order): -
Nest the SEQUENCE function inside the SORTBY function:
📝 The ROWS function simply counts the number of rows in a range.
If you don't have SEQUENCE, you can fill numbers manually, then sort by that column in descending order.
Use the SORT function in Excel 365/2021 to sort your data by one or multiple columns.
-
The simple SORT function:
=SORT(A2:D10)
(Sorts by the first column in ascending order)
-
Sort by a different column:
=SORT(A2:D10, 2)
(Sorts by the second column)
-
Sort in descending order:
=SORT(A2:D10, 2, -1)
(Second column, descending)
-
Sort by multiple columns:
=SORT(A2:D10, {1, 2}, {1, -1})
(By Last Name ascending, then by Sales descending)
All screenshots referenced above can be found in the /Screenshots
folder.
- Microsoft Excel (recommended: 2021/365 for modern formulas)
- Windows OS (for custom list sorting)
Project and documentation by Kuba27x
Repository: Kuba27x/Excel-13