Skip to main content
SingaporeComputer ApplicationsSyllabus dot point

How do I sort and filter data in a spreadsheet to put it in order and show only the rows I need?

Sort data by one or more columns and apply filters to display only rows meeting chosen criteria, keeping rows of data together

A step-by-step answer to the N-Level Computer Applications outcome on sorting and filtering spreadsheet data: ordering by one or more columns and filtering to show only rows that meet chosen criteria.

Generated by Claude Opus 4.88 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

This outcome is about putting data in order and showing only the rows you need. You should be able to sort a list by one column or by several columns at once, understand why whole rows must move together so the data stays matched, and apply a filter to display only the rows meeting a condition while the rest are hidden, not deleted. In the written paper you describe the steps and the difference between sorting and filtering; in the practical you sort and filter real data.

The answer

Sorting

Sorting puts the rows into an order based on a column. You can sort:

  • Text from A to Z (ascending) or Z to A (descending).
  • Numbers from smallest to largest or largest to smallest.
  • Dates from oldest to newest or newest to oldest.

The most important rule is that whole rows must move together. A row of data belongs together: a student's name, class and score are one record. When you sort, the spreadsheet should reorder the entire row, not just one column. If you select only one column and sort it, that column reorders while the others stay still, and every record breaks.

Sorting by more than one column

You can sort by several columns in order of priority. For example, sort first by Class (A to Z), then within each class by Score (highest first). The first sort is the main order; the second sort breaks ties within the first. This groups the data neatly, such as each class together with its top scorer first.

Filtering

A filter hides the rows that do not meet a condition, leaving only the matching rows visible. The hidden rows are not deleted; they come back when you clear the filter. For example, you can filter a class list to show only class 4A, or a stock list to show only items with fewer than ten in stock. Filtering lets you focus on part of a large list without changing or losing the rest.

Sorting versus filtering

  • Sorting keeps every row showing but changes their order.
  • Filtering keeps the order but hides rows that do not match.

You can use both together, for example filter to one class, then sort that class by score.

Examples in context

Example 1. A leaderboard. A games club keeps scores in a sheet and sorts the whole table by Score, largest first, to make a leaderboard. Because the entire row moves, each player's name stays attached to their score at its new position.

Example 2. A stock check. A shop filters its inventory to show only items with stock below ten, so the staff see exactly what to reorder. After ordering, they clear the filter and every product is visible again, untouched.

Try this

  • Cue. Explain why you must select the whole table, not just one column, before sorting. (So entire rows move together and each record stays matched; sorting one column alone scrambles which name goes with which value.)

  • Cue. Describe how to show only the rows for class 4A in a class list. (Apply a filter to the heading row, click the Class column arrow, and tick only 4A so the other rows are hidden.)

  • Cue. State the difference between sorting and filtering. (Sorting reorders all rows but keeps them showing; filtering keeps the order but hides rows that do not meet the condition.)

Exam-style practice questions

Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Original4 marksA spreadsheet has columns for Name, Class and Score, with one student per row. Describe how to sort the list so the highest score is at the top, and explain why you must select all the columns, not just the Score column.
Show worked answer →

To sort: click any cell in the data, choose Sort, sort by the Score column, and set the order to largest first (descending). The highest score moves to the top.

You must include all the columns (or let the spreadsheet expand the selection to the whole table) so the Name and Class travel with their Score. If you sort only the Score column, the scores reorder but the names and classes stay put, so the data no longer matches up and every row becomes wrong.

What markers reward: sorting by the Score column in descending order, and the key reason that the whole row must move together or the data breaks.

Original3 marksExplain the difference between sorting and filtering a list of data, and give one example of when you would use a filter.
Show worked answer →

Sorting puts every row into an order, such as A to Z or highest to lowest, but keeps all rows showing. Filtering hides rows that do not meet a condition, so only the rows you want remain visible, while the hidden rows are still there.

Example of filtering: show only the students in class 4A, or only items with stock below ten, so you can focus on those rows without deleting the rest.

What markers reward: the contrast that sorting reorders all rows while filtering hides rows that do not match, and a sensible filter example.

Related dot points