Sorting and Filtering
Sorting and Filtering
Spreadsheets allow you to sort data so that it appears in a different order. For example,
you may want to list people alphabetically, or by age starting with the oldest. When you Aim: To learn how to
sort and filter data in
are sorting data, you can choose to order it in one of the following ways: Microsoft Excel and
Google Sheets.
Sort Ascending 1, 2, 3 a, b, c 1/3/16, 4/6/17, 7/9/18
Sort Descending 3, 2, 1 c, b, a 7/9/18, 4/6/17, 1/3/16
b. Open a new workbook in Excel (or a new sheet in Google Sheets) and enter the data into the range A1:E6. If
you have the Word version of this resource, you should be able to copy and paste the data. Correct the
mistake in the data.
c. Select the whole worksheet by clicking the rectangle in the top-left, as shown.
Click on this
rectangle to
select all the
data.
CoP045 – Spreadsheets & Data ORB Education. Visit www.orbeducation.com for a range of quality teaching resources.
Sorting and Filtering (page 2)
d. In Excel
In Sheets
e. Make sure the My data has headers box is selected (Or Data has header row, in Sheets) otherwise your row of
headings will be included in the sorting process.
f. Click OK (or Sort) to sort the data and check the results.
Note: If you accidentally include the headings in a sort, it is best to Undo. If you have already made other
changes, then it is possible to cut and paste the row of headings so that it is returned to the top.
g. Name the worksheet “Albums” and save (or name) your workbook “07 Sorting Filtering”.
Shortcuts
Try the keyboard shortcut ‘Ctrl + A’ to select all the data (or ‘⌘ + A’ on a Mac).
In Excel, try placing the cursor in a cell and click the ‘Data / Sort Smallest to
Largest’ (as shown on the right). The first time you try this, you will be shown a
Sort Warning. Make sure Expand the Selection is selected and click Sort.
Note: A similar shortcut in Google Sheets will always include the row of
headings.
CoP045 – Spreadsheets & Data ORB Education. Visit www.orbeducation.com for a range of quality teaching resources.
Sorting and Filtering (page 3)
a. Select rows 3 to 6 and click ‘Data / Sort’ (or ‘Data / Sort range’ in Sheets).
b. This selection of data doesn’t include the row of headings. The choices in the menu are therefore Column A,
Column B etc. Select Column B.
Excel Sheets
c. Make sure that the My data has headers / Data has header
row box is unchecked and click OK / Sort.
Task 4 – Filtering
Sometimes, you may want to view only part of the data in your spreadsheet. For example, you may need a list of
people who are aged 15 years old or a list of people from the same family. Filtering will allow you to view and print a
selection of data based on criteria. The filtered data below shows albums from the top five that were released in
2016. The ones released in 2015 have been filtered out.
Note: The data isn’t removed from the spreadsheet; it is simply hidden from view.
Look at the data in the picture below. Write down the number of rows displayed when each of the filters described
is applied. Assume that each filter is removed before the next one is set up.
CoP045 – Spreadsheets & Data ORB Education. Visit www.orbeducation.com for a range of quality teaching resources.
Sorting and Filtering (page 4)
e. To display all the records again, click on the arrow and choose Select All then OK.
f. To remove the filter, select ‘Data / Filter’ again (or ‘Data / Turn off filter’ in Sheets).
CoP045 – Spreadsheets & Data ORB Education. Visit www.orbeducation.com for a range of quality teaching resources.