Sorting and Filtering Data in Excel
Sorting and Filtering are powerful Excel tools used to organize and analyze data efficiently. Sorting arranges data in a specific order, while Filtering displays only the records that meet certain criteria.
Important: Sorting changes the order of records, whereas Filtering hides records that do not meet the selected condition.
Sorting Data
Sorting arranges data in ascending or descending order based on one or more columns.
Types of Sorting
| Sorting Type |
Description |
| A to Z |
Sorts text alphabetically in ascending order. |
| Z to A |
Sorts text alphabetically in descending order. |
| Smallest to Largest |
Sorts numbers in ascending order. |
| Largest to Smallest |
Sorts numbers in descending order. |
| Oldest to Newest |
Sorts dates from earliest to latest. |
| Newest to Oldest |
Sorts dates from latest to earliest. |
Sample Student Data
| ID |
Name |
Course |
Fees |
| 101 |
Rahul |
Excel |
5000 |
| 102 |
Priya |
Python |
7000 |
| 103 |
Amit |
Tally |
6000 |
| 104 |
Sneha |
Power BI |
8000 |
Steps to Sort Data
- Select any cell within the data range.
- Go to Data Tab.
- Click Sort A to Z or Sort Z to A.
- Excel rearranges the records automatically.
Example
Sort the Name column from A to Z.
| Before Sorting |
After Sorting (A-Z) |
| Rahul |
Amit |
| Priya |
Priya |
| Amit |
Rahul |
| Sneha |
Sneha |
Multi-Level Sorting
Excel can sort data using multiple columns.
| Level |
Example |
| First Sort |
Course (A-Z) |
| Then By |
Fees (Largest to Smallest) |
Filtering Data
Filtering displays only the records that match selected criteria and temporarily hides the remaining records.
Why Use Filters?
| Benefit |
Purpose |
| Quick Search |
Find specific records instantly. |
| Data Analysis |
Analyze selected information only. |
| Reporting |
Show only relevant records. |
Steps to Apply Filter
- Select the entire data range.
- Go to Data Tab.
- Click Filter.
- Dropdown arrows appear in each column heading.
- Select the values you want to display.
Example: Filter by Course
Display only students enrolled in Python.
| ID |
Name |
Course |
Fees |
| 102 |
Priya |
Python |
7000 |
Filter Types
| Filter Type |
Example |
| Text Filter |
Names starting with “A” |
| Number Filter |
Fees greater than 6000 |
| Date Filter |
Current Month Records |
| Custom Filter |
Fees between 5000 and 8000 |
Clear Filter
- Go to Data Tab.
- Click Clear.
- All records become visible again.
Keyboard Shortcuts
| Shortcut |
Function |
| Ctrl + Shift + L |
Apply or Remove Filter |
| Alt + A + S + S |
Open Sort Dialog Box |