Contact

Apple Numbers RANDARRAY Function: Shape, Inclusive Bounds and Controls

Mathematical Intermediate Apple Numbers

Specify random-array shape and type using Apple’s inclusive limits, and validate downstream formulas with complete fixed fixtures.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

RANDARRAY produces a rectangular array of random values with specified rows, columns, limits and numeric type. Its useful expected results are constraints such as shape and bounds, rather than one predetermined grid of numbers.

Apple explicitly says the returned values are greater than or equal to the minimum and less than or equal to the maximum. This inclusive statement applies to the documented function; another program’s random-function endpoint convention should not replace it.

Availability and verification

The official RANDARRAY reference was retrieved October 15, 2026. The original function-introduction release and last functioning version are unknown from the checked sources. Current shared function documentation is not a last-working-build test or evidence of identical behavior on every older Mac, iPad, iPhone and iCloud client.

No native Numbers session was executed. The examples use independent arithmetic or constrained text models, with data-dependent results identified explicitly. Public-source retrieval is separate from native verification.

Syntax and documented optional mode

RANDARRAY(number-of-rows, number-of-columns, min-value, max-value, result-type)

The first two arguments specify shape and the next two specify numeric limits. result-type is TRUE for integers or FALSE for real values; FALSE is also the documented omitted-mode behavior.

The dedicated entry does not state defaults for omitted row, column, minimum or maximum arguments. The examples therefore supply all four, rather than importing the optional-argument defaults of Excel or Zoho Sheet.

Example: a two-by-three integer array

=RANDARRAY(2,3,5,10,TRUE)

Expect two rows, three columns, and six integer values, each within 5 through 10 inclusive. There are six allowed integer values, but the array is not documented as a sample without replacement. Repeated values are not evidence of an error.

Apple illustrates a possible grid containing rows 9, 7, 8 and 7, 10, 8. That is an example, not an exact expected draw. Its arithmetic controls are row totals 24 and 25, column totals 16, 17 and 16, and grand total 49.

Complete deterministic downstream fixture

Before testing a formula that consumes random data, use a fixed grid. Put the following values in A2:C3:

Row A B C
2 5 6 7
3 8 9 10

The row sums are 18 and 27. The column sums are 13, 15 and 17. The grand total is 45 and the mean is 7.5.

These are synthetic input values, not claimed RANDARRAY output. If the downstream row totals are wrong on this table, fix the surrounding references before attributing a discrepancy to randomness.

Example: real values and explicit shape

=RANDARRAY(3,2,1,10,FALSE) requests six real values arranged in three rows and two columns. For a fixed substitute fixture, use rows 1.25, 4.5; 6.75, 9.25; and 2, 8.

Their row totals are 5.75, 16 and 10, column totals are 10 and 21.75, and grand total is 31.75. These values satisfy the documented range but are not predictions of a future draw.

Omitting only result-type retains the real-value mode according to Apple. Supplying TRUE is the clear way to request whole numbers. A formatted integer-looking display in real mode is not proof of a type error; formatting may hide decimals.

Advanced: check invariants instead of exact draws

Six values within 5–10 must have a sum between 30 and 60. Their mean must also lie within 5 and 10. A reported total of 75 is incompatible with the stated six-element fixture, regardless of the particular random draw.

For the three-by-two 1–10 real array, the corresponding total bounds are 6 through 60. These constraints test shape, limits and downstream references; they do not establish uniformity, independence, a seed algorithm or the likelihood of any particular sum.

Advanced: compare scenarios on the same inputs

When comparing two consuming formulas, use the same recorded grid for both. Separate random draws can change the answer even when the formulas are equivalent. Preserve a fixed input fixture with the report if exact reproduction is required.

The official entry does not identify a reproducible seed argument. It also does not promise cryptographic suitability. Do not use these spreadsheet examples as a method for generating authentication secrets.

Errors and troubleshooting

Keep the row and column order explicit and reserve enough output space for the intended shape. Native array placement, blocked output cells, invalid dimensions, reversed limits and fractional bounds were not tested here, and the dedicated source does not provide a complete error matrix.

If values appear outside the intended range, inspect stored values, the actual limit arguments and downstream references. If a screenshot does not match a later grid, that alone is not a failed test: the contract concerns the requested random array, not a fixed collection of printed numbers.