Contact

Gnumeric · Data entry · Beginner

Generate a Random-Integer Table in Gnumeric

Use Gnumeric's Random Number Generation dialog for a fixed 20-cell integer table. Check its size, bounds and values without expecting a repeatable sequence.

Documentation and released-source workflow; validation formulas checked in Gnumeric 1.12.62 CLI; random-generation dialog and GUI verification pending · Editorial standards

Use the Random Number Generation dialog when you need a table of sampled values that stays fixed after it is generated. This example requests two columns of ten integers, each from 1 to 6 inclusive. It checks the table’s structure and allowed values, not the statistical quality of a random generator.

The menu path and controls below are checked against the Gnumeric 1.12.62 English GTK desktop source. The packaged manual describes the tool, but its older distribution list and bounds labels do not fully match that release. The dialog has not been run for this lesson. Only the checking formulas were tested headlessly on deliberately authored, non-random data.

Choose a fixed table, not a live random formula

The generation tool writes numeric values into cells. Recalculating a workbook does not replace those values with a new sample. By contrast, cells containing =RAND() or =RANDBETWEEN(1,6) contain volatile formulas that can change on recalculation. An individual formula may happen to return the same value again.

This is also different from running a Monte Carlo simulation, which repeatedly samples input formulas and summarizes dependent outputs. Use that separate workflow for a simulation model, not merely to fill a fixed practice table.

Generate two columns of ten integers

Work in a disposable workbook or save a separate practice copy first.

  1. Choose Data → Fill → Random Generators → Uncorrelated…. The dialog title is Random Number Generation. Do not choose the separate Correlated tool or Tools → Simulation.
  2. On Random Numbers, choose Uniform Integer in Distribution. This is not the Uniform choice, which generates continuous values.
  3. Set Lower Bound to 1 and Upper Bound to 6. Use these whole-number limits, rather than entering fractions and assuming the dialog rounds them like RANDBETWEEN.
  4. On Options, set Number of variables to 2 and Size of sample to 10. Variables determine the number of columns; sample size determines the rows in each column. Check both entries explicitly because an existing selection can preset them.
  5. On Output, choose New sheet. This keeps the result away from existing data and avoids a too-small manually specified output range. You do not need to type any input values or probability table for Uniform Integer.
  6. Click OK once. On the new output sheet, inspect A1:B10: the source-defined result is ten rows by two columns, with values beginning at A1 and no generated heading row. Keep this layout unchanged while applying the checks below.

The requested table has 2 × 10 = 20 numeric cells. Each value must be one of 1, 2, 3, 4, 5 or 6. Repeated values are allowed. The two columns are separate sampled variables, not a sample column plus a probability column.

No particular sequence, minimum, maximum, sum or average is promised. In a sample this small, a valid table need not contain both endpoints or every possible integer. Uniform Integer does not mean that the six integers must appear equally often in this one table.

Check all twenty cells

On the new output sheet, put these formulas outside A1:B10:

Cell Formula Required result
E13 =COUNT(A1:B10) 20 numeric cells
E14 =MIN(A1:B10)>=1 TRUE
E15 =MAX(A1:B10)<=6 TRUE

COUNT matters because MIN and MAX alone do not prove that every position contains a number. Also inspect the rectangle: the requested shape is two columns and ten rows, not ten columns and two rows. Do not change the range to include cells outside the generated block just to obtain 20.

Check the integer condition as well. In E1, enter:

=AND(ISNUMBER(A1),A1>=1,A1<=6,A1=INT(A1))

In F1, enter:

=AND(ISNUMBER(B1),B1>=1,B1<=6,B1=INT(B1))

Copy E1:F1 down through E10:F10, keeping relative references. E10 must refer to A10 and F10 to B10. All twenty helper cells should contain their checking formulas and return TRUE. A FALSE or an error means that the corresponding input needs investigation.

Put =AND(E1:F10) in E16; expect TRUE once all twenty helper formulas are present and passing. Keep E13’s numeric-count check too. Displaying numbers with zero decimal places is not an integer test: formatting can hide a fractional value without changing it.

Prove the checks can detect a bad value

Use a separate scratch sheet, not your saved random sample. Fill A1:B10 with the constant 1, then enter the same helper and summary formulas. These are deliberate test inputs, not an example of random output.

With the other nineteen cells still equal to 1, change only B10:

B10 test input E13: numeric count E14: lower bound E15: upper bound F10 and E16
1 20 TRUE TRUE TRUE
6 20 TRUE TRUE TRUE
2.5 20 TRUE TRUE FALSE
7 20 TRUE FALSE FALSE
0 20 FALSE TRUE FALSE
Empty cell 19 TRUE TRUE FALSE

These six deterministic cases were independently checked and recalculated with Gnumeric 1.12.62 ssconvert. They establish the behavior of the validation formulas only. They do not establish that the dialog generated a table, that a random sequence was observed, or that a small sample passes a statistical randomness test.

Preserve the sample and generate another safely

Inspect one result cell in the formula entry area: a generated result should be a number, not a RAND or RANDBETWEEN expression. Save the workbook in Gnumeric’s native format, and record the distribution, bounds, dimensions and run date beside the table or on another sheet. Keep those notes outside A1:B10 and the checking cells.

To obtain another sample, run the dialog again and explicitly choose New sheet again. Keep the original sheet for comparison. Reopening the dialog or copying its settings is not a documented seed mechanism, and this lesson makes no promise of reproducing the same sequence. Saving the actual values preserves the sample you have, rather than trying to regenerate it later.

Troubleshoot the settings before trusting the table

  • OK is unavailable: for this Uniform Integer setup, check that both dimensions are positive integers, both bounds are numeric with the lower bound no greater than the upper bound, and the output destination is valid. Re-select New sheet if an invalid Output range was left selected.
  • Decimals appear or the integer helpers fail: verify that Distribution is Uniform Integer, not Uniform. Read the actual cell values, not just their number format. Do not round an accidental continuous sample and call it the requested integer sample.
  • Too few cells or the wrong shape: recheck the two Options entries and the destination. An explicitly sized output range can restrict output. Generate a fresh result on a new sheet instead of overwriting adjacent data or padding the missing cells manually.
  • Values change when the workbook recalculates: inspect whether those cells contain random formulas instead of generated numbers. Keep formula-based and values-only tables on clearly identified sheets.
  • The menu or labels differ: check the installed version, language and platform. This procedure describes released 1.12.62 English GTK controls, not a tested Windows, macOS or older-version interface.

First-party references and verification limits

The official Gnumeric 1.12.62 source archive contains the packaged manual’s Generating Random Number Sequences section in doc/C/data-entry-advanced.xml. Exact menu and dialog labels are additionally checked in GNOME_Gnumeric-gtk.xml, wbc-gtk-actions.c, dialogs/random-generation.ui and dialogs/dialog-random-generator.c. The released generation implementation writes numeric cell values; src/gnm-random.c defines the inclusive integer bounds.

The source files were compared byte-for-byte with that archive. No interactive generation, application screenshot, saved random-sample reopen, statistical distribution test or cross-platform execution is claimed. The headless formula checks above must not be treated as native dialog validation.