Key points
- Define the complete data range before sorting so each record’s fields move together.
- Keep an original version and stable record IDs, then check IDs against key fields afterwards.
- If records appear misaligned, stop using and distributing the file rather than guessing the original order.
What is the most important step before sorting?
Identify every field belonging to one complete record, then sort the relevant data range together. For example, company name, contact method, service and owner may belong to one record; moving only the name leaves the other fields behind. This is an illustrative example, not a description of a real company list.
We recommend starting with a copy and recording the range, headers, sort column and direction. If the sheet contains a separate summary or another table, do not include the entire worksheet merely for convenience.
How should you respond to Excel’s “Expand the selection” warning?
First check whether the selection contains the whole record. Microsoft’s sorting guidance warns that sorting only part of a larger range can disassociate it from its original data. If that is not intentional, expand the selection and verify the resulting range.
The absence of a warning is not proof of safety. Behaviour can differ by version and data structure. Stop to clarify the range if there are blank columns, separate data blocks or ambiguous headers.

How do you specify a range in Google Sheets?
On a computer, select the complete group of cells, then use the Data menu’s range-sorting and advanced sorting options. Identify the header row correctly when one exists. See Google’s official sorting and filtering instructions for the steps.
Distinguish sorting a range from sorting the entire sheet. When only one data block needs sorting, an independent list beside it should not move too. In a shared file, agree who owns formal sorting and which view colleagues should use.
How can you check that fields still match afterwards?
We recommend stable record IDs rather than row numbers as identities. Preserve selected reference pairs before sorting, then compare the ID, contact method and other key fields afterwards. Check real customer data within its existing authorised environment rather than transferring it to unrelated services.
Compare record counts and inspect samples from the beginning, middle and end. Equal counts do not prove correct field pairing. Formulas, merged cells and hidden data need additional checks by someone familiar with the workbook.
What should you do if a sort has already gone wrong?
Stop using and distributing the questionable version, preserve its current state and timing, and ask the file owner to compare it with a pre-sort version or reliable original source. Before using undo, establish which later edits it would affect; do not roll back colleagues’ newer information without checking.
Without a reliable earlier version or stable IDs, do not reconstruct records by guessing from similar names or email addresses. Mark unresolved records for verification by the data owner. A sorting incident is not permission to remove duplicates.
Which simple rules can a small team adopt?
- Define each data block and its headers clearly.
- Use stable record IDs rather than post-sort row numbers.
- Keep a traceable version and trial the sort in a copy.
- Verify key field pairings, not just the visible order.
- Pause contact, quotations or fulfilment based on the questionable version until mismatches are resolved.
If you are considering spreadsheet automation, clarify fields and verification rules before choosing tools and human review. AI or automation does not remove the need to check record integrity. This article does not claim that HKONE supplies a particular spreadsheet feature or guarantee.
Frequently asked questions
Can I sort only the name column?
Not when other columns belong to the same record. Move the related fields together.
Does an unchanged record count prove the sort is safe?
No. Fields may still be mismatched, so compare record IDs and key information.
Can row numbers act as customer IDs?
They are not recommended. A row number describes a position; use stable IDs to identify records before and after sorting.
Should Google Sheets always sort the whole sheet?
No. Define the required data block first and avoid disturbing independent information on the same sheet.
Can AI guess how to repair mismatched records?
Guessing is not evidence. Compare a reliable original source or earlier version and keep unresolved records unverified.
