MODULE 2 · LESSON 2.3
Sorting, Filtering and Data Validation
Estimated time: 25 minutes
2.3.1 What is sorting?
Sorting means arranging data in a particular order.
- Facility names alphabetically.
- Patient counts from smallest to largest.
- Reporting dates from oldest to newest.
- Indicator values from highest to lowest.
| Facility | Patients |
|---|---|
| Central Clinic | 120 |
| Riverside Clinic | 95 |
| Hilltop Clinic | 110 |
| Facility | Patients |
|---|---|
| Central Clinic | 120 |
| Hilltop Clinic | 110 |
| Riverside Clinic | 95 |
2.3.2 What is filtering?
Filtering allows you to display only the records that meet particular conditions.
Imagine you have reports for 20 facilities but want to see only those reporting in February. You can filter the Month column to display February records.
- One particular facility.
- Records with missing values.
- Facilities reporting zero cases.
- Reports from a particular local government area.
Filtering does not necessarily delete the other records. It temporarily hides records that do not meet the selected conditions.
| Facility | Month | Patients |
|---|---|---|
| Central Clinic | February | 135 |
| Riverside Clinic | February | 100 |
2.3.3 What is data validation?
Data validation helps control what users can enter into a cell.
Suppose you are designing a spreadsheet for monthly facility reports. You want to prevent users from entering an impossible number of patients, using inconsistent facility names or selecting an invalid reporting month.
- Restricting a numeric field to non-negative whole numbers.
- Providing a drop-down list of approved facility names.
- Restricting dates to an acceptable period.
- Requiring a value to fall within a defined range.
Validation rules do not guarantee that every entry is correct. A plausible number can still be inaccurate, and a valid entry can still describe the wrong facility or reporting period.
2.3.4 A simple data validation example
Suppose a worksheet has a column called Patients Attended. You want the entries to be whole numbers greater than or equal to zero.
- Select the cells where patient counts will be entered.
- Open the Data tab.
- Select Data Validation.
- Choose a whole-number restriction.
- Set the minimum value to zero.
- Save the rule.
The exact menu layout may vary by Excel version. You can also create a drop-down list of approved facility names to reduce inconsistent spelling.
Lesson 2.3 exercise
Suggested answers
- What is the difference between sorting and filtering?
- If you want to see only February reports, which feature would you use?
- Why should you use an approved list of facility names?
- Does data validation guarantee that all data is correct?