Cambridge IGCSE ICT 0417 – Topic 20: Spreadsheets – Sorting DataTopic 20 – Spreadsheets
Objective
Be able to sort data using a single criterion, or multiple criteria into ascending or descending order.
1. What is Sorting?
Sorting rearranges the rows of a spreadsheet so that the information appears in a logical order. The order can be:
- Ascending – from smallest to largest, A to Z, earliest to latest.
- Descending – from largest to smallest, Z to A, latest to earliest.
2. When to Use Sorting
- Finding the highest or lowest values quickly.
- Preparing data for charts or reports.
- Checking for duplicate entries.
- Grouping related records together.
3. Sorting by a Single Criterion
- Select any cell within the column you want to sort.
- Open the Data menu (or ribbon) and choose Sort A‑Z for ascending or Sort Z‑A for descending.
- The entire rows are moved so that the selected column is ordered, while the other columns stay linked to their original rows.
4. Sorting by Multiple Criteria
When more than one column determines the order, you must define the hierarchy of criteria.
- Go to Data → Sort… (or the equivalent dialog in your spreadsheet program).
- Add the first sort level:
- Choose the primary column (e.g., Region).
- Select Ascending or Descending.
- Add a second level:
- Choose the secondary column (e.g., Sales).
- Select the required order.
- Repeat for additional levels if needed, then click OK.
5. Example – Single vs. Multiple Criteria
| Student | Class | Score |
|---|
| Alice | 10A | 78 |
| Bob | 10B | 85 |
| Charlie | 10A | 92 |
| Diana | 10B | 68 |
| Edward | 10A | 85 |
Sort by a single criterion (Score, descending):
| Student | Class | Score |
|---|
| Charlie | 10A | 92 |
| Bob | 10B | 85 |
| Edward | 10A | 85 |
| Alice | 10A | 78 |
| Diana | 10B | 68 |
Sort by multiple criteria (Class ascending, then Score descending):
| Student | Class | Score |
|---|
| Charlie | 10A | 92 |
| Edward | 10A | 85 |
| Alice | 10A | 78 |
| Bob | 10B | 85 |
| Diana | 10B | 68 |
6. Practical Tips
- Always include a header row and use Freeze Panes so the headings stay visible while sorting.
- Check that the data range is correct; accidental exclusion of a column can break the relationship between rows.
- Use Custom Sort when you need a non‑alphabetical order (e.g., Monday‑Tuesday‑…‑Sunday).
- Remember that sorting is a stable operation in most spreadsheet programs – rows with equal values retain their original relative order.
- Undo (Ctrl+Z) can reverse an unwanted sort instantly.
7. Common Mistakes to Avoid
- Sorting only a single column without selecting the whole data set – this separates data from its related rows.
- Leaving blank cells in the sort column – blanks are usually placed either at the top (ascending) or bottom (descending), which may distort results.
- Sorting numeric data stored as text – they will be ordered alphabetically (e.g., 10, 2, 30) instead of numerically.
8. Practice Exercise
Use the following data set. Perform the tasks described and record the resulting order.
| Product ID | Category | Units Sold | Revenue (£) |
|---|
| P102 | Electronics | 45 | 9,000 |
| P215 | Clothing | 120 | 6,000 |
| P317 | Electronics | 30 | 6,500 |
| P423 | Home | 80 | 8,800 |
| P531 | Clothing | 95 | 7,600 |
| P642 | Home | 55 | 5,500 |
- Sort the data by Revenue (£) in descending order.
- Sort the data by Category (ascending) and then by Units Sold (ascending).
- Explain why the second sort gives a different arrangement from the first.
9. Summary
- Sorting arranges rows based on the values in one or more columns.
- Ascending = smallest → largest; Descending = largest → smallest.
- Single‑criterion sorting is quick; multiple‑criterion sorting requires defining the hierarchy.
- Always select the whole data range and keep headers intact.
- Check data types (numbers vs. text) before sorting.
Suggested diagram: Flowchart showing the decision process for choosing single‑criterion vs. multiple‑criterion sorting.