How to Sort Data in Excel Quickly and Easily
To sort data in Excel, select the cells or table you want to sort, then go to the
Data tab and click Sort. Choose the column to sort by and select ascending or descending order, then click OK to reorder your data.Syntax
Excel sorting is done through the Sort feature in the Data tab. You can sort by one or more columns, choosing ascending (A to Z or smallest to largest) or descending (Z to A or largest to smallest) order.
For formula-based sorting, you can use the SORT function with this syntax:
=SORT(array, [sort_index], [sort_order], [by_col])
Where:
arrayis the range or array to sort.sort_indexis the column (or row) number to sort by (default 1).sort_orderis 1 for ascending or -1 for descending (default ascending).by_colis TRUE to sort by column, FALSE to sort by row (default FALSE).
excel
=SORT(A2:C10, 2, 1)
Output
Returns the range A2:C10 sorted by the 2nd column in ascending order.
Example
This example shows how to sort a list of names and scores by score in descending order using the SORT function.
excel
Original data in A1:B5: Name Score Anna 85 Ben 92 Cara 78 Dave 90 Formula in D1: =SORT(A2:B5, 2, -1) Result in D1:E4: Ben 92 Dave 90 Anna 85 Cara 78
Output
Sorted list by Score descending: Ben 92, Dave 90, Anna 85, Cara 78
| Name | Score |
|---|---|
| Ben | 92 |
| Dave | 90 |
| Anna | 85 |
| Cara | 78 |
Common Pitfalls
Common mistakes when sorting data in Excel include:
- Not selecting the entire data range, causing only part of the data to sort and misalign rows.
- Sorting only one column without expanding selection, which breaks data relationships.
- Forgetting to include headers in the selection or not checking the "My data has headers" box.
- Using the
SORTfunction without understanding it creates a new sorted array and does not change original data.
excel
Wrong way:
Select only column A and sort.
Right way:
Select all columns of your data before sorting or use the Sort dialog and check "My data has headers".Quick Reference
| Action | Description |
|---|---|
| Select Data | Highlight the full range including all columns and rows to sort. |
| Go to Data Tab | Click the Data tab on the ribbon. |
| Click Sort | Open the Sort dialog to choose sorting options. |
| Choose Column | Select the column to sort by. |
| Select Order | Pick ascending or descending order. |
| Confirm | Click OK to apply the sort. |
| Use SORT Function | Use =SORT(range, column, order) for dynamic sorting. |
Key Takeaways
Always select the entire data range before sorting to keep rows intact.
Use the Data tab's Sort feature for manual sorting with multiple columns.
The SORT function creates a new sorted list without changing original data.
Check 'My data has headers' to avoid sorting header rows.
Choose ascending or descending order based on your sorting needs.