Contact

Gnumeric · Data management · Intermediate

Shuffle Complete Records with Integrity Checks in Gnumeric

Rearrange synthetic records using Gnumeric's Rows shuffle mode, preserve the original, and detect broken ID/item/quantity relationships.

Gnumeric 1.12.62 source-qualified shuffle semantics; independent integrity checks; native verification pending · Editorial standards

Use Shuffle to vary the display order of a small synthetic practice table while retaining each record’s fields. This is not a procedure for selecting a representative sample, allocating experimental treatments or running a fair draw. Preserving records and validating randomness are different problems.

Scope: free Gnumeric desktop on Linux, English controls in official 1.12.62 source, reviewed 21 October 2026. No native GUI shuffle or screenshot was available. Source inspection establishes the described modes; independent checks establish record invariants, not actual random output or a certified probability distribution.

Keep an untouched original

On a sheet named Source, enter A1:C7:

ID Item Units
S101 Cable 8
S102 Adapter 5
S103 Stand 12
S104 Hub 7
S105 Sleeve 4
S106 Clip 9

There are six distinct IDs and 45 units. Every input is a plain value. This exercise avoids formulas, merged cells, filters, hidden records and ambiguous IDs with spaces or wildcard characters.

Save shuffle-start.gnumeric, then create a working file. Duplicate Source using Edit → Sheet → Duplicate, explicitly select the new tab, and rename it Shuffled. Confirm Source still exists and contains the original order. Gnumeric may leave the original tab active after duplicating, so do not infer that the highlighted sheet is the new copy.

Shuffle complete row segments

  1. On Shuffled, select A2:C7, excluding the header row and including all three fields.
  2. Open Data → Shuffle. Confirm Input Range is the selected six-record block on Shuffled.
  3. Explicitly choose Rows under Shuffle Method. Do not accept the existing choice without looking.
  4. Confirm, then inspect the headers and all six records.

The menu manual identifies Shuffle. The official 1.12.62 source, src/dialogs/dialog-shuffle.c, shuffle.ui and src/tools/data-shuffling.c, resolves an important ambiguity: Rows moves complete row segments within the selected rectangle. Columns moves column segments; Area moves individual cells. The dialog chooses Area initially for a multirow, multicolumn rectangle in this source version. That default is unsafe for this record table.

Shuffle is an in-place operation in the reviewed implementation, not a separate-output report. Selecting only the ID column would leave items and quantities behind. A field in column D would also be left behind unless you deliberately included it.

No particular resulting order is promised. A row can remain in its original position; even an unchanged short arrangement is possible. Neither proves the command failed.

Audit each record after shuffling

Create the checks after shuffling so this exercise does not depend on how pre-existing formulas relocate during the operation.

On Shuffled put Original record matches in E1. In E2 enter:

=COUNTIFS(Source!$A$2:$A$7,A2,Source!$B$2:$B$7,B2,Source!$C$2:$C$7,C2)

Fill E2:E7. Every result must be 1: the ID, item and units still match one complete original row. Use your locale’s argument separators. See COUNTIFS for the function’s comparison rules; these simple consistent identifiers avoid case and wildcard ambiguities.

Now on Source put Occurrences after shuffle in E1 and enter in E2:

=COUNTIF(Shuffled!$A$2:$A$7,A2)

Fill through E7. Every original ID must appear exactly once. This second check catches omissions and repeated records that a row-by-row validity test alone could miss. Finally check =COUNT(Shuffled!C2:C7) = 6 and =SUM(Shuffled!C2:C7) = 45. Source must still retain its original row order.

Show why a total is not enough

Save the checked working copy. Find S101 and S102 on Shuffled and temporarily exchange only their Units values: give S101 5 and S102 8. The total remains 45 and every ID remains unique, but the two corresponding record-match checks must become 0.

Restore S101 to 8 and S102 to 5. All match checks must return to 1. This deliberate corruption test demonstrates why a sum and row count do not establish record integrity.

For another shuffle, start again from a fresh duplicate of Source’s A1:C7 data, without the audit helper columns, then add the checks afterward. This keeps the exercise’s formula-relocation boundary explicit.

Troubleshooting, limits and recovery

The reviewed shuffle implementation swaps positions using randomly chosen positions across the range. This guide does not establish uniform permutation probabilities or a reproducible seed contract. Do not equate the result with validated random sampling or random assignment. Use a separately justified method for statistical work; Sampling is a different tool with its own limits.

If headers move, columns change places, or record matches fail, stop. Undo immediately if appropriate, or discard the working copy and restart from the saved original. Do not sort a damaged table and assume that reconstructs the original field relationships.

Save the valid working file as .gnumeric, close and reopen it, then inspect the original and rerun both directions of the integrity checks. Native behavior and persistence remain unverified here. Keep the original until you have completed those checks in your installed build.