LibreOffice Calc · Data entry and filling · Intermediate
Fill Reproducible Random Test Data in LibreOffice Calc
Use Calc's seeded random-fill tool to create a fixed test fixture, compare a repeat run, and check bounds without inventing a guaranteed sequence.
LibreOffice 26.8 Help-backed workflow; independent invariant checks; native execution pending · Editorial standards
Create a small synthetic input block you can use while testing a workbook. Sheet → Fill Cells → Fill Random Numbers writes generated values into the selected cells. It is different from sampling existing records and from a formula that produces new numbers when recalculated.
Scope: free desktop Calc, English standard menus on Windows/Linux, following Help labeled 26.8, reviewed 21 October 2026. The Help’s access line uses the singular “Fill Random Number”; use that entry if your menu does too. No native GUI run or screenshot was available for this exercise. The checks below are independently reasoned expectations, not an observed seeded output sequence.
Reserve the input and comparison blocks
Start a new ODS workbook with a sheet named TestData. Put First run in A1, Repeat run in C1 and Same value? in E1. Leave A2:A13 and C2:C13 empty. Put STOP in A14 and C14. Save a checkpoint before filling: the command replaces destination contents.
This example needs twelve integers from 1 through 6, allowing repeated values. It does not create twelve distinct identifiers, a shuffled deck, or a sample without replacement. Repetition is normal.
Generate one fixed block
- Select A2:A13 and open Sheet → Fill Cells → Fill Random Numbers.
- Verify Cell Range names only that twelve-cell block.
- Choose Uniform Integer, Minimum 1, Maximum 6.
- Enable custom seed and enter 12345. Leave rounding disabled; the chosen distribution already produces integers.
- Confirm the dialog. Inspect A14: it must still contain STOP.
- Record your exact Calc version from Help → About LibreOffice, operating system, range dimensions, distribution, bounds and seed in a note beside the block.
The random-fill help documents these inputs. A seed is a recipe input, not a promise that another release, platform, generator implementation or distribution algorithm reproduces the same sequence. Preserve the actual generated values when exact future replay matters.
Check properties, not a made-up list
Enter these checks in H2:H6:
| Cell | Formula | Required result |
|---|---|---|
| H2 | =COUNT(A2:A13) |
12 |
| H3 | =MIN(A2:A13)>=1 |
TRUE |
| H4 | =MAX(A2:A13)<=6 |
TRUE |
| H5 | =SUM(A2:A13)>=12 |
TRUE |
| H6 | =SUM(A2:A13)<=72 |
TRUE |
To check every value is an integer, enter =A2=INT(A2) in F2 and fill through F13. Every result must be TRUE. Twelve integers bounded by 1 and 6 must sum to at least 12 and at most 72; they need not total 42 or contain each face twice. These checks can detect a wrong range or distribution, but do not certify random quality.
Repeat with exactly the same settings
Generate C2:C13 with the same distribution, bounds and enabled seed 12345 in the same installed build. Keep the range shape identical. In E2 enter =A2=C2 and fill through E13. All twelve comparisons should be TRUE for a successful same-build replay. Check C14 remains STOP.
If they differ, do not replace the first block to hide the discrepancy. Recheck the custom-seed switch, seed, bounds, distribution, rounding and range shape; record both outputs and the exact build if the mismatch persists. This article has not executed the generator and does not supply a purported reference sequence.
Inspect a generated cell in the formula bar. It should contain a value, not =RAND() or another formula. Recalculate with F9, then recheck E2:E13. Generated values should stay unchanged. The RAND help explicitly distinguishes random fill from volatile RAND formulas.
Test the checker independently
After saving the matching blocks, deliberately replace C2 with 99. E2 must become FALSE, and =MAX(C2:C13)<=6 must be FALSE. Restore C2 by copying A2 as a value, or regenerate the full C block with the original settings. This negative control shows your comparisons can detect a mistake; it is not a generator test.
For a new test fixture, generate an empty separate block with another positive seed. Do not require every cell to differ: two legitimate random runs can share values or even an entire short sequence. Keep each fixture’s settings with it.
Troubleshooting and limits
- Old values below the result: check the selected range and STOP markers. Do not count leftover cells as new output.
- Unexpected decimals: choose Uniform Integer, not Uniform with a number format that merely hides decimals.
- Different values after an ordinary recalculation: inspect whether you entered random formulas instead of using Fill Random Numbers.
- Unexpected sample average: twelve draws do not guarantee the theoretical mean or equal category counts.
- Need representative records: use Sampling instead. Generating values does not sample your existing dataset.
Save as ODS, close and reopen, then inspect both blocks and repeat the comparisons. Persistence and native controls remain unverified here. Do not use this exercise for passwords, security tokens, regulated draws or claims of statistical representativeness.