Nishaglobal Education logo

Tables, sorting, filtering and drop-down lists

Turn a range into an Excel table, sort and filter thousands of rows in seconds, remove duplicates, use the FILTER, SORT and UNIQUE functions, and stop typing mistakes with drop-down lists.

Lesson 8 of 1235 minQuiz: 4 questions

🎯 By the end of this lesson you will be able to:

  • Format data as a table and sort and filter it
  • Use FILTER, SORT and UNIQUE to build lists that update themselves
  • Prevent typing errors with Data Validation drop-down lists
Outline
  1. What you'll learn and why it matters
  2. Format as a table
  3. Sorting
  4. Filtering
  5. FILTER, SORT and UNIQUE: lists that update themselves
  6. Removing duplicates
  7. Drop-down lists with Data Validation
  8. Practice
  9. Common mistakes
  10. Recap
  11. Quiz
  12. Mark lesson complete

What you'll learn and why it matters

With real data you rarely look at every row. You need *only this month*, *the biggest orders first*, *each region once*. Tables, sorting and filtering do that instantly, and drop-down lists stop people typing Nroth instead of North in the first place.

Format as a table

  1. Click any cell inside your data (the Sales sheet).
  2. On the Home tab choose Format as Table (or Insert → Table), pick a style, and confirm that *My table has headers* is ticked.
  3. Excel adds banded rows, filter arrows on every heading, and gives the table a name such as Table1 (change it on the Table Design tab).
What a table gives youWhy it helps
Filter and sort arrows on each headingSort and filter without selecting anything
Grows automatically when you add a row below itFormulas, charts and PivotTables include new data
Formulas copied down the whole column automaticallyNo more forgotten rows
Structured references like =SUM(Table1[Total])Formulas that read like English
A Total Row (Table Design tab)Totals, averages or counts with one click

Sorting

Click the arrow on a heading and choose Sort Smallest to Largest (A to Z for text) or Largest to Smallest. For several levels, such as *by region, then by total*, use Data → Sort (called Custom Sort in some versions) and add levels.

Filtering

Click a heading's arrow, untick Select All, and tick just the values you want, such as *North*. Rows that do not match are hidden, not deleted; the row numbers turn blue to remind you. Filter several columns to combine conditions. Clear Filter shows everything again.

FILTER, SORT and UNIQUE: lists that update themselves

These newer functions return a whole list that spills into the cells below and to the right. Change the data and the list updates. They work in Excel for the web, Microsoft 365, Excel 2021 and later, and Google Sheets.

Worksheet: Sales

UNIQUE lists each region once and SORT puts them in order (column H). FILTER returns the product of every North order (column J). The results spill down from the single formula cell.
RowABCDEFGHIJKL
1RegionSalespersonProductUnitsPriceTotalRegionsNorth products
2WestAshaSketchbook113003300EastPen set
3NorthMeeraPen set42501000NorthNotebook
4WestRaviSketchbook3300900SouthPen set
5NorthSaraNotebook91201080WestDesk lamp
6EastRaviNotebook2120240
7NorthMeeraPen set82502000
8EastMeeraBackpack215003000
9NorthAshaDesk lamp412004800
10SouthKofiNotebook111201320
11WestRaviWater bottle104004000

Formulas (green cells)

  • F2 =D2*E2 → 3300
  • H2 =SORT(UNIQUE(A2:A11)) → East
  • J2 =FILTER(C2:C11,A2:A11="North") → Pen set
  • F3 =D3*E3 → 1000
  • F4 =D4*E4 → 900
  • F5 =D5*E5 → 1080
  • F6 =D6*E6 → 240
  • F7 =D7*E7 → 2000
  • F8 =D8*E8 → 3000
  • F9 =D9*E9 → 4800
  • F10 =D10*E10 → 1320
  • F11 =D11*E11 → 4000
UNIQUE lists each region once and SORT puts them in order (column H). FILTER returns the product of every North order (column J). The results spill down from the single formula cell.
FormulaReturns
=UNIQUE(A2:A11)Each different value once
=SORT(range)The range sorted (add ,2,-1 to sort by column 2, largest first)
=FILTER(range, condition)Only the rows where the condition is TRUE
=FILTER(range, (A2:A11="North")*(D2:D11>=5))Rows matching both conditions (* means AND)

Removing duplicates

Select the data and choose Data → Remove Duplicates, then tick the columns that define a duplicate (for example, Email). Excel deletes the extra rows and tells you how many it removed. Work on a copy first if you are unsure, or use UNIQUE to see the result without deleting anything.

Drop-down lists with Data Validation

  1. Select the cells where people will type, such as the Region column.
  2. Choose Data → Data Validation.
  3. Under Allow, pick List. In Source, type North,South,East,West or select a range that holds the list.
  4. On the Error Alert tab, write a helpful message, such as *Choose a region from the list*.

Now each cell shows a small arrow with the choices, and anything else is rejected. Other rules allow only whole numbers in a range (such as units from 1 to 100) or only dates.

Practice

Guided exercise

List each salesperson once

Next to the ten orders, list every salesperson once, in alphabetical order, with one formula.

  1. In H1 type the heading Salespeople.
  2. In H2 type =SORT(UNIQUE(B2:B11)).
Show the solution

Worksheet: Sales

RowABCDEFGH
1RegionSalespersonProductUnitsPriceTotalSalespeople
2WestAshaSketchbook113003300Asha
3NorthMeeraPen set42501000Kofi
4WestRaviSketchbook3300900Meera
5NorthSaraNotebook91201080Ravi
6EastRaviNotebook2120240Sara
7NorthMeeraPen set82502000
8EastMeeraBackpack215003000
9NorthAshaDesk lamp412004800
10SouthKofiNotebook111201320
11WestRaviWater bottle104004000

Formulas (green cells)

  • F2 =D2*E2 → 3300
  • H2 =SORT(UNIQUE(B2:B11)) → Asha
  • F3 =D3*E3 → 1000
  • F4 =D4*E4 → 900
  • F5 =D5*E5 → 1080
  • F6 =D6*E6 → 240
  • F7 =D7*E7 → 2000
  • F8 =D8*E8 → 3000
  • F9 =D9*E9 → 4800
  • F10 =D10*E10 → 1320
  • F11 =D11*E11 → 4000

How to get there: UNIQUE removes repeats and SORT orders the result. One formula spills into as many rows as needed, and it updates if a new salesperson appears in the data.

Your turn

Big orders only

List every order total of 2,000 or more, largest first, with one formula. Hint: FILTER the Total column, then SORT the result largest first.

Show the solution

Worksheet: Sales

RowABCDEFGH
1RegionSalespersonProductUnitsPriceTotalBig totals
2WestAshaSketchbook1130033004800
3NorthMeeraPen set425010004000
4WestRaviSketchbook33009003300
5NorthSaraNotebook912010803000
6EastRaviNotebook21202402000
7NorthMeeraPen set82502000
8EastMeeraBackpack215003000
9NorthAshaDesk lamp412004800
10SouthKofiNotebook111201320
11WestRaviWater bottle104004000

Formulas (green cells)

  • F2 =D2*E2 → 3300
  • H2 =SORT(FILTER(F2:F11,F2:F11>=2000),1,-1) → 4800
  • F3 =D3*E3 → 1000
  • F4 =D4*E4 → 900
  • F5 =D5*E5 → 1080
  • F6 =D6*E6 → 240
  • F7 =D7*E7 → 2000
  • F8 =D8*E8 → 3000
  • F9 =D9*E9 → 4800
  • F10 =D10*E10 → 1320
  • F11 =D11*E11 → 4000

How to get there: FILTER keeps the totals of at least 2,000; SORT(…, 1, -1) sorts them largest first. Five orders qualify. To show whole rows instead, filter the whole table: =SORT(FILTER(A2:F11,F2:F11>=2000),6,-1) sorts by the 6th column.

Common mistakes

Sorting a single selected column

You see: Values move away from their rows and the data is scrambled

Fix: Click one cell and sort from the heading arrow, or press Ctrl+Z immediately.

Forgetting a filter is on

You see: Totals and copies seem to be missing rows

Fix: Look for blue row numbers and filter icons; choose Clear Filter.

Blocking a spill

You see: #SPILL!

Fix: Clear the cells where the list needs to spill.

Blank rows in the middle of the data

You see: Sorting and tables stop at the gap

Fix: Delete empty rows so the data is one solid block.

Recap

  • Format as Table adds filters, banding, automatic growth and structured references.
  • Sort from the heading arrows so whole rows move; filter hides rows without deleting them.
  • FILTER, SORT and UNIQUE return lists that spill and update automatically.
  • Data Validation lists stop typing mistakes before they happen.

Key terms

Table
A range formatted with Format as Table, with a name, filters and automatic growth.
Spill
When one formula returns several values that fill the cells below and beside it.
Data Validation
Rules that limit what can be typed into cells, such as a drop-down list.

Check your understanding

Answer all 4 questions, then check your answers to see an explanation for each one.

  1. 1. What happens to rows hidden by a filter?

  2. 2. What does =UNIQUE(A2:A100) return?

  3. 3. You see #SPILL! in a cell. What is the usual fix?

  4. 4. How do you stop people typing region names wrongly?

Answer all 4 questions to check.

Mark this lesson complete

Finished this lesson?

When you have worked through the examples and exercises, mark it complete to save your progress.