New

Admissions Open for ADCA & MDCAA 2026 Batch!

Apply Now
{}[]<>()/;=

Sort and Filter in Excel

Article · 6 min read Free Preview
Sorting rearranges your rows in order (A–Z, or highest to lowest). Filtering hides the rows you don't want to see so you can focus on the rest. Both live on the Data tab. Select your data, click Sort or Filter, and choose your rule. This lesson shows both, plus multi-level sort.

Sorting rearranges the rows of your data into an order, like A to Z or highest to lowest. Filtering hides the rows you don't need so only the ones you care about show. Both tools sit on the Data tab. Click inside your table, then use Sort to reorder or Filter to narrow down. Neither one deletes anything, so they're safe to use on any list.

Sort vs filter, in one line

  • Sort = reorder every row.
  • Filter = temporarily hide some rows.

Use sort when you want a ranked list. Use filter when you want to see just one group.

Step by step: sort a column

  1. Click any cell inside your data (don't select just one column, or Excel may sort that column alone and scramble your rows).
  2. Go to the Data tab.
  3. Click A→Z to sort ascending, or Z→A for descending.

Excel keeps each row together while it reorders, so a student's name stays with their marks.

Sort by more than one column

To sort by Zone first, then by Sales inside each zone:

  1. Click inside the data, then Data ▸ Sort (the big Sort button).
  2. In the box, set Sort by: Zone.
  3. Click Add Level, set Then by: Sales, order Largest to Smallest.
  4. Click OK.

Now your list is grouped by zone, and within each zone the biggest sales come first.

Step by step: filter data

  1. Click inside your data.
  2. Go to Data ▸ Filter. Small dropdown arrows appear on each heading.
  3. Click the arrow on the column you want to filter.
  4. Untick (Select All), then tick only the values you want to see (say only "Delhi").
  5. Click OK. Rows that don't match are hidden.

The row numbers turn blue and skip the hidden rows, which is your clue that a filter is on.

Number and text filters

Click a filter arrow and you also get Number Filters (Greater Than, Top 10, Above Average) or Text Filters (Begins With, Contains). For example, Number Filters ▸ Greater Than ▸ 50000 shows only large sales.

To remove a filter, click the arrow and choose Clear Filter, or click Data ▸ Filter again to turn it off.

Worked example

SalespersonZoneSales (₹)
RahulNorth40,000
NehaSouth55,000
AmitNorth30,000

Sort by Sales, Largest to Smallest, and Neha jumps to the top. Add a filter on Zone and tick only North, and you see just Rahul and Amit, still ranked by sales.

Pro tips

  • Turn your range into a Table with Ctrl + T. Tables get filter arrows automatically and keep formatting tidy.
  • Sort by colour: if you've colour-coded rows, the Sort box can order by cell colour too.
  • After filtering, =SUBTOTAL(9,range) sums only the visible rows, unlike SUM which counts hidden ones.

Common mistakes

  • Selecting one column before sorting. This can sort that column while leaving the others in place, breaking every record. Click a single cell inside the data instead.
  • A blank row inside the data. Excel stops sorting or filtering at the first fully blank row. Remove stray blank rows.
  • Leaving a filter on. If numbers look wrong later, check whether a filter is still hiding rows (blue row numbers are the giveaway).

Key takeaways

  • Sort reorders rows; filter hides rows. Nothing is deleted.
  • Click one cell inside the data, then use the Data tab.
  • Use the Sort box with Add Level to sort by two or more columns.
  • SUBTOTAL adds only visible (filtered) rows.

Practice task

Take a list of 15 orders with City and Amount columns. Sort them by Amount, highest first. Then filter to show only orders from one city, and note how the row numbers change.

Sorting and filtering are the first steps in data analysis. Go further with pivot tables and dashboards in the ADCA program at HCI.

Frequently Asked Questions

How do I sort data in Excel?

Click a cell inside your data, go to the Data tab, and click A→Z or Z→A. Excel reorders whole rows so records stay together.

How do I filter data in Excel?

Click inside your data, choose Data ▸ Filter, click the dropdown arrow on a column, and tick only the values you want to see.

How do I sort by two columns?

Use Data ▸ Sort, set the first column, click Add Level, then set the second column. Excel sorts by the first, then by the second within it.

Does sorting delete data?

No. Sorting only changes the order of rows, and filtering only hides rows temporarily. Your data stays intact.

Why won't my whole table sort correctly?

Usually because a single column was selected or a blank row splits the data. Click one cell inside the table and remove blank rows, then sort again.

Need help? Chat with us!