Learning path · Level 2 · Tutorial 5

Sort and Filter a Complete Sales Register

Sort and filter a sales register in Excel or Calc without separating related values. Keep summaries outside the selected records, use category and amount filters to inspect a subset, and verify that clearing filters restores the full dataset without changing its contents.

  • Level: Beginner
  • Duration: 18 min
  • 8 steps
Start tutorial Back to the path
Sort and Filter a Complete Sales Register

What you will go through

  1. Identify the Complete Register Prepare a local sales register and identify the exact header-and-record range that can be used safely in later steps. 3 min
  2. Sort Without Separating Related Values Sort the complete Sales register safely by one field and verify that related values stay together. 2 min
  3. Set Primary and Secondary Sort Keys Configure a two-key sort so Category creates alphabetical groups and Amount orders each group from highest to lowest. 3 min
  4. Show One Category with a Filter 2 min
  5. Combine Category and Amount Conditions 3 min
  6. Interpret Summaries While Filters Are Active Understand why ordinary SUM and AVERAGE formulas still summarize the complete register while filters hide some records. 2 min
  7. Clear Filters and Check Record Integrity Clear all filter conditions, restore every sales record to view, and verify that sorting and filtering did not separate related values within records. 2 min
  8. Complete a Sales Register Check Independently complete a safe sort-and-filter workflow, verify the filtered result and full-register summaries, then restore and save the sales register. 3 min

What you will learn

  • Select the complete record range, recognize its headers, and exclude summary rows.
  • Sort records by a primary field and a secondary field while keeping each row intact.
  • Apply category and numeric filters to answer a focused question about sales records.
  • Clear filters and use record identifiers to check that related values remain together.
  • Explain why an ordinary SUM or AVERAGE result does not automatically summarize only the visible filtered records.

Before you start

  • Build a Structured Sales Register
  • Calculate and Check Totals and Averages

Step 1 of 8

Identify the Complete Register

Prepare a local sales register and identify the exact header-and-record range that can be used safely in later steps.

Create the baseline

Build the local practice worksheet

Create a blank workbook and rename the worksheet Sales.

Enter the eight records below in A1:E9, with the headers in row 1. Keep rows 10 and 11 blank. Then enter Total sales in D12 and =SUM(E2:E9) in E12; enter Average sale in D13 and =AVERAGE(E2:E9) in E13.

Excel: use File > Save As and save locally as Sales_Register_Practice.xlsx.

Calc: use File > Save As and save locally as Sales_Register_Practice.ods.

This worksheet is an ordinary cell range, not an Excel Table.

Sales register baseline

Enter these values in the header order shown. Dates should display as 2026-04-01; format Amount as US currency.

Records occupy A2:E9; row 1 contains the field names.
Sale IDDateCategoryProductAmount
S0012026-04-01StationeryNotebook set$40.00
S0022026-04-01TechnologyKeyboard$180.00
S0032026-04-02FurnitureChair$120.00
S0042026-04-02TechnologyMonitor$300.00
S0052026-04-03StationeryPen set$60.00
S0062026-04-03TechnologyPrinter$200.00
S0072026-04-04FurnitureShelf$80.00
S0082026-04-04TechnologyDock$220.00

Tip

Check the setup

After entering the formulas, E12 should show $1,200.00 and E13 should show $150.00. These summaries are deliberately separated from the records by two blank rows.

Recognize headers, records, and summaries

What belongs in the working range

A working range for a sales register contains one header row plus every field of every record. Here, the complete working range is A1:E9.

Row 1 names the fields: Sale ID, Date, Category, Product, and Amount. Rows 2–9 are the eight complete records. The summaries in rows 12–13 describe the register, but they are not records and must stay outside the working range.

One complete selected range

The blue outline shows the range to select later. Gray summary cells remain outside it.

Diagram of the Sales worksheet with A1 through E9 outlined in blue and summary cells D12 through E13 shaded gray outside the selection.

Select the headers and all records together; exclude the summaries.

Warning

Keep records and summaries separate

Do not select only one field, such as the Amount column. A sales record is the full row of related values. Also do not extend the selection through row 13: that would mix summary formulas with records.

Select the register explicitly

Make the safe selection

Select the range explicitly instead of depending on what the application guesses.

Excel: click the Name Box to the left of the formula bar, type A1:E9, and press Enter. You can also click A1 and drag to E9.

Calc: click the Name Box to the left of the formula bar, type A1:E9, and press Enter. You can also click A1 and drag to E9.

Confirm that the selection includes all five fields from column A through E and stops at row 9.

Tip

Recognize the header row

Keep row 1 with the selection because it identifies the fields. When you later use a command that asks whether the range has headers, treat row 1 as headers—not as a sales record. The record data begins at row 2.

Check your range choice

Identify the complete working range

On the Sales worksheet, select the range you would use for the complete register. Then write 2–4 sentences that state the range, identify the header row, and explain why selecting only one field or extending the selection through row 13 would be unsafe.

Write at least 120 characters (0/120).

Step 2 of 8

Sort Without Separating Related Values

Sort the complete Sales register safely by one field and verify that related values stay together.

Keep Each Record Together

Move complete records

Sorting changes the order of records; it does not change what belongs together. In the Sales register, each row from 2 through 9 is one complete record. When you sort by a field such as Amount, the entire row must move together: Sale ID, Date, Category, Product, and Amount.

Never sort only the Amount cells. That could place an amount beside the wrong Sale ID, product, or date.

One row stays one record

A safe sort reorders whole rows inside the blue selected register. The gray summary cells stay outside the sort range.

Before-and-after Sales worksheet diagram showing full records moving together during an Amount sort while summaries remain excluded.

The identifying marker stays with every related field as a record changes position.

Tip

Read the sort direction

Sort directions depend on the kind of stored value:

  • Text: ascending is A to Z; descending is Z to A.
  • Numbers, including recognized currency: ascending is smallest to largest; descending is largest to smallest.
  • Recognized dates: ascending is oldest to newest; descending is newest to oldest.

The displayed dollar sign or date format does not make the values ordinary text. The spreadsheet uses their recognized numeric or date values when sorting.

Choose the Field and Direction

Sort Amount from high to low

Practice a single-field sort on your local Sales sheet.

Excel: Select A1:E9. Choose Data > Sort. Turn on My data has headers. Set Sort by to Amount and Order to Largest to Smallest, then choose OK.

Calc: Select A1:E9. Choose Data > Sort. On Sort Criteria, set Sort key 1 to Amount and choose Descending. On Options, select Range contains column labels, then choose OK.

This is one sort operation on the complete register. The summaries in D12:E13 are not selected.

Warning

Protect the complete selection

If a warning suggests sorting only the current field or the selection is not clearly A1:E9, do not continue with an isolated Amount field. Cancel, select A1:E9 again, and confirm that the header row is included and the summaries are excluded.

After the sort, row 1 should still contain the field names. The records may be in a new order, but each record must remain intact.

Check the Direction

Interpret sort directions

Match each sort description to its correct result.

Tap an item and then its matching pair.

Verify the Sorted Register

Perform and verify the sort

On your local Sales sheet, select A1:E9 and sort Amount from largest to smallest with headers recognized. Then inspect the sorted register.

In your response, state the direction for text A to Z, numbers largest to smallest, and dates oldest to newest. Then report the first record’s Sale ID, Product, and Amount; the last record’s Sale ID, Product, and Amount; and whether the headers stayed at the top.

Write at least 100 characters (0/100).

Step 3 of 8

Set Primary and Secondary Sort Keys

Configure a two-key sort so Category creates alphabetical groups and Amount orders each group from highest to lowest.

Understand key priority

Two keys, one record order

A two-key sort has a priority order. The primary key creates the main groups; the secondary key orders only the records that have the same primary-key value.

For this register, set Category to ascending first. Then set Amount to descending. The result is alphabetical category groups, with the largest amount first inside each group.

Keep the complete register selected: A1:E9, including its headers. The summaries in D12:E13 stay outside the sort range.

How the two keys work

A before-and-after spreadsheet comparison showing whole sales records sorted first into category groups and then by descending amount within each category. The selected register is outlined in blue, while summaries are gray and excluded.

Category determines the groups first; Amount determines the order inside each category.

Configure the sort

Set both keys in the Sort dialog

Configure both keys in one sort operation. Do not run one separate sort for Category and then another unrelated sort for Amount: the second operation could replace the first ordering.

Excel: Select A1:E9 > Data > Sort. Select My data has headers. Set Sort by to Category and Order to A to Z. Select Add Level. Set Then by to Amount and Order to Largest to Smallest. Select OK.

Calc: Select A1:E9 > Data > Sort. On Options, select Range contains column labels. On Sort Criteria, set Sort key 1 to Category and choose Ascending. Set Sort key 2 to Amount and choose Descending. Select OK.

Tip

Protect the complete record

If a warning asks whether to expand a selection, do not sort only one field. Cancel if needed, reselect A1:E9, and open the Sort dialog again. Every field in each record must move with its Sale ID.

Read the grouped result

Expected grouped result

With Category ascending and Amount descending, the sorted register has this order. Amount restarts from the largest value whenever the Category changes.

The secondary Amount order applies within, not across, Category groups.
Sale IDCategoryProductAmount
S003FurnitureChair$120.00
S007FurnitureShelf$80.00
S005StationeryPen set$60.00
S001StationeryNotebook set$40.00
S004TechnologyMonitor$300.00
S008TechnologyDock$220.00
S006TechnologyPrinter$200.00
S002TechnologyKeyboard$180.00

Practice the configuration

Put the sort actions in order

Arrange the actions for one safe two-key sort of the complete register.

  1. Confirm header recognition: Excel, select My data has headers; Calc, select Range contains column labels.
  2. Run the sort by selecting OK.
  3. Set Category to ascending as the first key.
  4. Add Amount as the second key and set it to descending.
  5. Select A1:E9 and open the Sort dialog.

Check your two-key sort

Verify the final order

On the Sales worksheet, perform the two-key sort on A1:E9. Then report:

  1. The primary field and direction.
  2. The secondary field and direction.
  3. The eight Sale IDs in their resulting top-to-bottom order.
  4. Why Amount is not descending across the entire register.

Write at least 120 characters (0/120).

Step 4 of 8

Show One Category with a Filter

Filter visibility, not data

Filtering changes visibility

A filter controls which records you can see; it does not delete the records that do not match. For this task, work with the complete register range A1:E9, including its header row. The summaries in D12:E13 remain outside the filter range.

Your register is already sorted by Category ascending and then Amount descending. Filtering will keep that existing order among the records that remain visible.

What a category filter changes

A spreadsheet diagram shows a blue-outlined register with a Category filter active, gaps in row numbers for hidden records, and gray summary cells outside the selected range.

Gaps in row numbers and a filter indicator show that records are hidden, not removed. The summaries are not part of the filtered register.

Practice on the Sales worksheet

Example

Apply a Category filter

Apply the filter in your local practice workbook.

  1. Open the Sales worksheet in Sales_Register_Practice.xlsx or Sales_Register_Practice.ods.
  2. Select A1:E9 explicitly.
  3. Excel: choose Data > Filter. Calc: choose Data > AutoFilter.
  4. Open the filter arrow in the Category header.
  5. Show only Technology, then confirm the selection.

Do not select D12:E13. Look for a filter indicator in the Category header and gaps in the worksheet row numbers. Those gaps indicate hidden records. The visible Technology records retain their relative order from the existing Category-then-Amount sort.

Interpret the row gaps

Check your understanding

True or false: After you filter Category to show Technology, records from the other categories have been deleted from the Sales worksheet.

Apply the category filter

Report the filtered records

On the Sales worksheet, apply Category = Technology to A1:E9. List the visible Sale IDs from top to bottom. Then explain what happened to the other four records and whether filtering created a new sort order.

Write at least 80 characters (0/80).

Step 5 of 8

Combine Category and Amount Conditions

Understand the combined conditions

Two conditions narrow the view

A numeric filter compares each stored Amount with a threshold. The displayed dollar sign does not change the comparison: the condition Amount >= 200 includes an amount equal to 200 as well as larger amounts.

When two field filters are active, a record must meet both conditions to remain visible. Here, use Category = Technology AND Amount >= 200. Records that fail either condition are hidden; they are not deleted.

Two field filters converge so that only records meeting both conditions remain visible.

Both conditions must be true for a record to stay visible.

Criteria for the combined filter

Read each condition as a separate test before combining them.

The two tests are joined with AND.
FieldComparisonValueRequirement
Category=TechnologyCategory matches
Amount>=200Amount is 200 or more
CombinedANDbothBoth requirements match

Set the filter in your spreadsheet

Apply the amount condition

Keep the filter on the complete register A1:E9; the summaries in D12:E13 stay outside it.

Excel: With Category = Technology already active, open the Amount filter arrow. Choose Number Filters > Greater Than Or Equal To…, enter 200, then choose OK. The active filters on separate fields combine automatically.

Calc: Choose Data > More Filters > Standard Filter. Set the first rule to Field name Category, Condition =, Value Technology. On the next rule, choose Operator AND, then set Field name Amount, Condition >=, Value 200. Choose OK.

Look for filter indicators and gaps in row numbers: they show that nonmatching records are hidden.

Tip

Boundary check

Do not replace >= with >. The first comparison includes the boundary value; the second excludes it. Keep the Category condition active while you add the Amount condition.

Practice the inclusive comparison

Check the boundary

Which comparison should you use when a sale of exactly $200.00 must remain visible?

Check the matching records

Verify the combined filter

On your Sales worksheet, apply both conditions: Category = Technology and Amount >= 200.

List the visible Sale IDs in their worksheet order. Then state whether S006 at exactly $200.00 is included and whether S002 at $180.00 is included. Explain both decisions using the comparison and the category condition.

Write at least 100 characters (0/100).

Step 6 of 8

Interpret Summaries While Filters Are Active

Understand why ordinary SUM and AVERAGE formulas still summarize the complete register while filters hide some records.

See what the formulas still include

Filtering changes visibility, not the formula range

The active filters show three matching records, but they do not change the formulas below the register. E12 still contains =SUM(E2:E9), and E13 still contains =AVERAGE(E2:E9).

Those references still cover all eight amount cells in the register. Filtering changes which records you can see; it does not remove the amounts from E2:E9. Therefore, the displayed total remains $1,200.00 and the displayed average remains $150.00.

The formulas still point to every amount

A diagram shows three visible filtered records, five hidden records, and both summary formulas referring to all amount cells from E2 through E9.

Hidden rows remain part of E2:E9, so ordinary SUM and AVERAGE results do not change when the filter is active.

Avoid a misleading conclusion

Example

Describe the result accurately

A full-register result must not be described as a result for the visible subset.

Accurate statement: “The worksheet still shows the total and average for all eight records because the formulas reference E2:E9.”

Inaccurate statement: “The $1,200.00 total is the total of the three displayed Technology records.”

To summarize only visible records requires a different method. That method is outside this tutorial.

Quick check

Check the meaning of the total

True or false: While the filters are active, the $1,200.00 in E12 is the total for only the records currently shown.

Apply the summary check

Explain the unchanged summaries

A coworker says: “The displayed $1,200.00 total and $150.00 average describe only the three records currently shown.” Write one or two sentences to evaluate this claim. Cite the formula range and explain what happens to records that do not match the filter.

Write at least 60 characters (0/60).

Step 7 of 8

Clear Filters and Check Record Integrity

Clear all filter conditions, restore every sales record to view, and verify that sorting and filtering did not separate related values within records.

Restore the complete register

Clear every active filter

You previously filtered the register with two conditions. Now restore every record without changing any cell values.

Work only in the register range A1:E9; the summaries in D12:E13 remain outside it.

Excel: Click any cell in A1:E9, then choose Data > Clear.

Calc: Click any cell in A1:E9, then choose Data > More Filters > Reset Filter.

These commands clear all active conditions while keeping the filter controls available. Clearing a single field from its drop-down may leave a condition active in another field.

Filtering hides, then reveals, records

A comparison of a filtered sales register with hidden row gaps and the same register after all eight records are visible again; summaries remain outside the blue selected range.

Clear filters restores visibility for the complete register. It does not change the values in its records.

Verify that each record stayed intact

Check records by their identifiers

After filters are cleared, all eight records return, but the earlier two-key sort remains. Filtering controls visibility; it does not return the register to its earlier order.

Use Sale ID as the anchor for an integrity check. First confirm that S001 through S008 each appear exactly once. Then compare the Date, Category, Product, and Amount attached to each ID with this baseline. Check the whole record, not just one field.

Baseline records

Use this original baseline to compare fields, even if the displayed rows are currently in a different sorted order.

The baseline order is Sale ID ascending.
Sale IDDateCategoryProductAmount
S0012026-04-01StationeryNotebook set$40.00
S0022026-04-01TechnologyKeyboard$180.00
S0032026-04-02FurnitureChair$120.00
S0042026-04-02TechnologyMonitor$300.00
S0052026-04-03StationeryPen set$60.00
S0062026-04-03TechnologyPrinter$200.00
S0072026-04-04FurnitureShelf$80.00
S0082026-04-04TechnologyDock$220.00

Tip

Why totals are not enough

A count of eight records and an unchanged total of $1,200.00 are useful checks, but neither proves that values still belong to the correct Sale ID. For example, amounts swapped between two IDs would leave both the count and total unchanged.

If you want the original displayed order after checking, select A1:E9. Excel: choose Data > Sort, select Sale ID, and choose A to Z. Calc: choose Data > Sort, set Sort key 1 to Sale ID, choose Ascending, and select Range contains column labels. This is a new explicit sort, not an effect of clearing filters.

Practice a reliable verification sequence

Sequence the check

Put the integrity-check routine in the safest order.

  1. Optionally sort by Sale ID ascending to display the baseline order again.
  2. Compare each ID's Date, Category, Product, and Amount with the baseline.
  3. Clear every active filter condition.
  4. Confirm that each Sale ID from S001 through S008 appears exactly once.

Apply the complete check

Perform and report the integrity check

In your local Sales worksheet, clear every active filter condition. Then inspect the register against the baseline.

In 3–5 sentences, report that S001–S008 are visible exactly once and describe your comparison of the Date, Category, Product, and Amount for each record. State what happens to the existing two-key sort after filters are cleared unless you apply another sort. Finally, explain why a correct total alone is not proof that the records are intact.

Write at least 180 characters (0/180).

Step 8 of 8

Complete a Sales Register Check

Independently complete a safe sort-and-filter workflow, verify the filtered result and full-register summaries, then restore and save the sales register.

Set up the final workflow

Your end-to-end check

Use this final check on your local Sales worksheet. Work with the complete record range, then apply the established two-key sort and a new filter threshold. Keep the summaries outside the working range.

Workflow: clear any active filters → select A1:E9 → sort Category ascending and Amount descending → filter Category = Technology and Amount >= 220 → interpret the summaries correctly → clear all filters → verify all eight records → save locally.

The sort can remain useful after the filter is cleared. Clearing filters restores record visibility; it does not restore an earlier row order.

One workflow, intact records

A three-stage spreadsheet diagram shows selection of the full register, a two-key sort of complete rows, and a filtered view with hidden nonmatching rows.

The blue outline protects the complete register. Gray summary cells are never included in sorting or filtering.

Perform the independent check

1. Sort the complete register

Start with all records visible. If a filter is active, clear every condition first.

Excel: Click in A1:E9, then choose Data > Clear.

Calc: Click in A1:E9, then choose Data > More Filters > Reset Filter.

Select A1:E9 explicitly. Do not include the summaries in D12:E13.

Excel: Choose Data > Sort. Select My data has headers. Set Sort by to Category with A to Z. Choose Add Level, then set Then by to Amount with Largest to Smallest. Choose OK.

Calc: Choose Data > Sort. On Sort Criteria, set Sort key 1 to Category with Ascending, and Sort key 2 to Amount with Descending. On Options, select Range contains column labels, then choose OK.

If a warning suggests sorting only one field, cancel and reselect the full range.

2. Filter, interpret, and restore

Enable filter arrows if they are not already available on the register.

Excel: Select A1:E9, then choose Data > Filter.

Calc: Select A1:E9, then choose Data > AutoFilter.

Apply both conditions.

Excel: In the Category filter, leave only Technology selected. In the Amount filter, choose Number Filters > Greater Than Or Equal To…, enter 220, and choose OK.

Calc: Choose Data > More Filters > Standard Filter. Set Category to = Technology. On the next rule, choose AND, then set Amount to >= 220. Choose OK.

The formulas in E12 and E13 still refer to E2:E9, so do not describe them as summaries of only the visible records. When you finish checking the result, clear filters again using the appropriate command above.

Filter criteria

Use these exact conditions for the focused question.

A visible record must satisfy both conditions.
FieldComparisonValue
Category=Technology
Amount>=220

Report your verified result

Final application

Complete the workflow on your local worksheet before answering.

In one concise response:

  1. List the visible Sale IDs from top to bottom after the two-key sort and the filter conditions.
  2. Explain why $1,200.00 in E12 and $150.00 in E13 still describe the full register rather than only the visible records.
  3. State that you cleared every filter, verified that all eight Sale IDs appear once with their related Date, Category, Product, and Amount values intact, and saved the verified local workbook using the appropriate practice filename.

Write at least 180 characters (0/180).

Finish and save

Summary

Workflow recap

A reliable register check protects complete records throughout the workflow. The filter answers a focused question, while the existing formulas continue to describe all eight records. Clearing filters restores the records to view but leaves the chosen sort order in place.

  • Select A1:E9, not the summary cells in D12:E13.
  • Sort complete records by Category ascending, then Amount descending.
  • Apply both conditions: Category = Technology and Amount >= 220.
  • Treat $1,200.00 and $150.00 as full-register summaries while filters are active.
  • Clear every filter, then verify each Sale ID with its related fields before saving.

Sales register check complete

Congratulations! You completed: Sort and Filter a Complete Sales Register

Completed: you selected a safe range, sorted related values together, filtered with explicit conditions, interpreted full-register summaries correctly, and restored all records for a final integrity check.

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate