Sorting data
In Excel a list is treated like a database: a column is a field, a column header is the field name, and each row is a record. Sorting arranges the records by the value of a chosen field in ascending (smallest to largest, A to Z) or descending (largest to smallest) order; the number of records does not change. Select the whole table or one cell of it and use Data → Sort; the “my data has headers” tick keeps the first row out of the sorting. If you select and sort only one column, that column moves while the others stay, and names end up beside another person’s data. In a multi-field sort, records with equal first-field values are ordered by the second field, then the third. The letter order depends on the language: o‘, g‘, sh and ch may be placed differently from what you expect, depending on the language setting, so check the result; to be able to return to the original order, add a column of numbers beforehand.
A librarian put the book cards into alphabetical order by author. Each card was moved as a whole and the title and date stayed with the author.
Librarians, shop staff and database administrators sort records by a field.
Make five cards, each with a name and a number. Sort them by name, then sort them again by number.
| A | B | |
|---|---|---|
| 1 | City | Temperature, °C |
| 2 | Andijan | 28 |
| 3 | Bukhara | 31 |
| 4 | Nukus | 28 |
| 5 | Nukus | 25 |
“Sorting test”: a group builds a table of 6 product names and prices, sorts by name and then by price, and checks the result together.