Basic Excel for Data Analytics · Lesson 3 of 3
Sort, Filter, and Validate Spreadsheet Data
Inspect a dataset safely with filters, consistent sorting, data validation, and duplicate checks.
Lesson
1. Introduction
Sorting and filtering help answer focused questions without changing the source records. They are also common sources of accidental damage: sorting only one column can disconnect values that belong to the same observation.
2. Understand the concept
Treat a table row as one complete record. Sort the whole table, filter on explicit criteria, and make sure hidden rows are not mistaken for deleted records. Data validation can restrict new entries; duplicate checks should use the actual business key rather than every column by default.
3. Syntax and interpretation
Filter: Status = "Complete" and Region = "North"
Sort: Order Date ascending, then Order ID ascending
Duplicate key: Customer ID + Order Date + Order NumberA composite key may identify an event when no single column is unique. Confirm the key definition with the data owner.
4. Apply it to an analysis
Inspect a dataset safely with filters, consistent sorting, data validation, and duplicate checks. Start with a small, known example and state what each row or value represents. After the transformation, check row counts, types, keys, and units against the original data. If an assumption fails, stop and investigate instead of presenting the output as a valid result.
5. Common mistakes
- Sorting a single column rather than expanding the selection to all record columns.
- Deleting duplicates without keeping a review copy or confirming the key.
6. Practice task
A row is an order line and orders can contain several lines. Is Order ID alone a valid unique row key?
7. One possible solution
Not necessarily. Use a line identifier or a composite key such as Order ID plus Line Number, depending on the source schema.8. Summary and next step
Inspect a dataset safely with filters, consistent sorting, data validation, and duplicate checks. Continue to the next course section and apply this foundation to a different analytics tool or workflow.
Visual guide
Working through Sort, Filter, and Validate Spreadsheet Data
-
Step 01
Define
State the question, data grain, and expected output.
-
Step 02
Apply
Use the method and check its assumptions on a small example.
-
Step 03
Verify
Reconcile the result and communicate limitations.
Code examples
=COUNTIF($A:$A,A2)>1
TRUE when the identifier in A2 appears more than once in column A.
Data Validation → List → New, Processing, Complete, Cancelled
Users choose a consistent status from a controlled list.
Key points
- Inspect a dataset safely with filters, consistent sorting, data validation, and duplicate checks.
- Check the result against the stated data definition and a representative example.
- Record assumptions and report data-quality limitations rather than hiding them.
Check your understanding
Practice
Your learning progress