Google Sheets two-column sort orders records by one key and then another within equal first-key values. Use six fictional rows to check the complete ID order, preserve record associations and save an observation card you can reopen.
Content checked: 19 October 2026.
What should a two-column range sort accomplish?
Google Sheets two-column sort uses one column as the first ordering rule and another to order records within equal first-column values. After this exercise, you can sort six fictional records, check the complete expected ID order and verify that each description still belongs to its original ID. Save a small observation card and reopen both the spreadsheet and the card.
Consider a workshop coordinator reviewing a practice list. Priority has already been assigned; the task is not to decide which real job deserves attention. It is to apply the supplied numeric priority and sequence rules correctly. A sort key means the column used for ordering. It has nothing to do with passwords or access credentials.
A convincing-looking first column is not enough. If IDs and descriptions become separated, the table can appear neatly ordered while the records are wrong. We will select the entire practice rectangle and inspect each record as a unit. This is a fictional exercise, not a client case or an observed account test. No sorting, saving, reopening or timing trial was performed for this article.
The saved filter-view walkthrough selects which records are visible. That is a different output. Here all six IDs must remain visible exactly once; their order changes. No filter, shared operational sheet or permission change is needed.
Build an isolated six-record practice spreadsheet
On a computer, open sheets.google.com in an account you are permitted to use. Create a blank spreadsheet and name it “Two-key practice 01.” Use a new isolated practice file rather than a live team queue. Editing permission is a prerequisite. If you cannot edit the file, do not try a different account or permission workaround to force this exercise to proceed.
Enter the following header and six records in A1:D7. Each row is a complete record: ID, priority, sequence and description belong together. Use the supplied numeric values without formulas, merged cells, dates or numbers stored intentionally as text. Those additional cases need their own checks and would make this small result harder to interpret.
| ID | Priority | Sequence | Description |
|---|---|---|---|
| R01 | 2 | 20 | Box |
| R02 | 1 | 20 | Label |
| R03 | 2 | 10 | Pen |
| R04 | 1 | 10 | Notebook |
| R05 | 3 | 10 | Envelope |
| R06 | 2 | 30 | Paper |
Before sorting, compare every entered field with the table. R01 belongs with Box and R04 belongs with Notebook. Preserve all six original rows in your observation card. Keeping only an unsorted list of IDs would not let you verify the ID-to-description association later. The reference rows must remain unchanged when you evaluate the output.
Formula protection is outside this exercise. The formula-cell protection guide deals with edit boundaries in a different task. Being able to edit this new practice file is not evidence that particular cells are protected, that an independent backup exists or that changes in a shared production file would be harmless.
Write the expected order before opening the sort dialog
State the rule in plain language: “Priority ascending first; Sequence ascending within each equal Priority.” Priority 1 contains R02 and R04. Sequence 10 precedes 20, so that group must be R04, R02. Priority 2 contains three records whose sequence values are 10, 20 and 30, giving R03, R01, R06. Priority 3 contributes the final record, R05.
Your complete expected ID order is R04, R02, R03, R01, R06, R05. Write it down before applying the software operation. Otherwise the result on screen can quietly become its own answer key. Sorting Sequence first would produce another plausible arrangement, but it would answer a different ordering question.
The two keys do different work. Start by establishing the priority groups, then inspect the ordering inside each group. Every Priority-and-Sequence pair is unique in this practice set. You therefore do not need an assumption about how the application preserves the order of completely tied records. Do not describe the exercise as proving stable tie behaviour.
There are two acceptance checks. The first concerns the full sequence of IDs. The second concerns each ID’s three associated fields. All six IDs can be present while a description is attached to the wrong one. Check the complete record against the preserved source, rather than treating a successful-looking first column as a complete result.
Select the whole rectangle and apply both sort keys
Follow Google’s header preparation by freezing the first row. On desktop, use View > Freeze > 1 row. Then select all of A1:D7, including the header and every data column. Do not select only Priority or Sequence while leaving ID and Description outside the operation. Inspect the highlighted rectangle before opening the command.
Choose Data > Sort range > Advanced range sorting options. Because your columns have titles, select Data has header row. Set the first sort column to Priority and its direction to A to Z, ascending for these supplied numbers. Choose Add another sort column, then set Sequence to A to Z as the second rule.
Click the final Sort control. Compare the IDs with your prewritten answer, then inspect each record’s remaining fields. If a required menu or column name is unavailable, stop at the precise obstacle. “Second key unavailable” or “range not confirmed” is more informative than guessing which adjacent control might do something similar.
This route sorts the selected practice range. It is not an instruction to sort the entire sheet or to work only on a filtered subset. If something fails, leave the practice result unresolved and do not move into live business data. Manually changing descriptions to make a bad result appear correct would change the reference rather than verify the operation.
Check complete records and reopen the spreadsheet
After sorting, count six distinct IDs, each appearing once. Read the whole order, not just the endpoints. R04 should be first and R05 last, but those two positions do not establish that the middle four records are correct. Then compare every ID’s priority, sequence and description with the original rows preserved on your card.
| Check | Expected result | Observed status |
|---|---|---|
| IDs | Six distinct IDs, each once | Not checked |
| Complete order | R04, R02, R03, R01, R06, R05 | Not checked |
| Associated fields | Every ID retains its original fields | Not checked |
The expected column is a target for your own check, not a report of success. Leave an observation as not checked until you actually inspect it. Check the file’s saving status before closing the browser tab. If you cannot establish that saving has finished, leave persistence unresolved instead of assuming an online file must already be safely stored.
Close the practice file, reopen it by its name from the Sheets starting page and repeat the order and field checks. If the file cannot be located, or its contents differ, record that specific result. Reopening a spreadsheet and reopening a local text card are separate actions; success in one does not prove the other.
The Sheets edit-notification walkthrough sets up a different observation route. A notification is not evidence that your six records are correctly ordered. Likewise, the card is a record of this exercise, not an independent backup of every workbook or a guarantee about concurrent editing.
Save and reopen one explicit observation card
On Windows, open Start, search for Notepad and create a new blank document. Copy the template below and add the original six complete rows. Keep expected results separate from observations. Record the spreadsheet name and tab so that a different practice file cannot accidentally become the evidence for this check.
Two-key sort card 01 Date, spreadsheet and tab: Range: A1:D7, header present Original six complete records: Key 1: Priority ascending Key 2: Sequence ascending Expected: R04,R02,R03,R01,R06,R05 Observed order: not checked ID-to-field associations: not checked Spreadsheet reopened: not checked Unresolved issue and next step:
Press Ctrl+S, choose Documents and save as sheets-two-key-sort-check-01.txt. Close the editor and reopen the same file from Documents. Read back both key directions, the expected order and the actual observations. If a check was not performed, its status should still say so. Do not replace missing evidence with the expectation from the table.
A fifteen-minute planning allowance can cover entering the records, predicting the answer, applying the sort and checking both saved objects. This is not a measured completion-time promise. An unresolved result should identify the missing input, control or persistence observation without inventing success. The aim is one traceable operation, not a larger spreadsheet redesign.
For a broader next step, the Sheets workflow guide examines other processes. If an AI tool later proposes an ordering rule, the artificial intelligence guide offers wider context. This exercise needs no AI account: the supplied keys, preserved records and manual checks are sufficient to define its result.
Frequently asked questions
Can I sort only the Priority column?
Not for this exercise. Select all of A1:D7 so ID, priority, sequence and description stay within the same complete-record operation.
Why is a second key needed?
It orders records that have equal first-key values. Here Sequence ascending determines the order inside each Priority group.
Do I need a filter view?
No. All six records remain visible and the selected complete range is reordered. A saved filter view is a different task.
What if the output does not match?
Record the mismatch and do not proceed to live data. Do not change the expected answer to fit the observed output.


