RANDARRAY in WPS Spreadsheet: Generate Test Integers Without Promising Fixed Results
Create a bounded random integer grid in WPS, verify shape and range, and keep illustrative random values separate from observed results.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: =RANDARRAY(5,4,0,9,TRUE) requests five rows and four columns of random integers from 0 through 9. The shape and allowed values are predictable; the individual draws are not.
Availability and evidence scope
The official WPS RANDARRAY lesson documents the behavior used here. It identifies WPS Office for Windows Personal. Reviewed October 19, 2026, this Chinese-language evidence does not establish an exact introduction build, every current edition, or English-global, Mac, Linux, web or mobile behavior. No new WPS execution or native screenshot was possible; the examples are independent controls or explicitly conditional fixtures.
Historical entry method versus newer releases
The 2021 lesson demonstrates selecting the complete result range, entering the formula and pressing Ctrl+Shift+Enter. Braces shown around an array formula are added by that workflow; do not type them as part of the formula. That historical method is the reproducible workflow described here.
The official Windows release log separately announces dynamic arrays in October 2023. Consequently, the older lesson’s no-dynamic-array statements are historical, not a claim that current WPS cannot expand array results. For a newer installation, confirm its array-entry behavior and available output space in that build. This guide does not import Excel spill rules, error codes, spill-reference operators or cross-workbook behavior into WPS. Monthly release notes do not establish an exact introduction build for RANDARRAY.
Syntax and arguments
=RANDARRAY(rows,columns,min,max,integer)
The official lesson names five parameters in this order. Supply all five for these examples rather than relying on defaults.
rowsandcolumnsdescribe the output rectangle.minandmaxdefine the range; the lesson demonstrates 0 to 9.integeris TRUE in the demonstrated integer case.
The source’s prose accidentally describes the (5,4,...) example as four rows and five columns. Its parameter order and actual illustrated H2:K6 output show five rows and four columns. This guide follows that supported interpretation. It does not reverse the first two arguments to copy the prose error.
Example 1: generate a test-digit matrix
For the historical workflow, select A2:D6, enter =RANDARRAY(5,4,0,9,TRUE) and confirm with Ctrl+Shift+Enter. There is no input table. The result contains 5 × 4 = 20 cells.
One possible illustrative grid is:
| A | B | C | D |
|---|---|---|---|
| 2 | 7 | 0 | 9 |
| 5 | 5 | 1 | 3 |
| 8 | 4 | 6 | 0 |
| 1 | 9 | 2 | 8 |
| 3 | 6 | 7 | 4 |
These numbers were constructed only to illustrate a valid shape and range. They are not a recorded WPS output and should not be expected on your machine. A test passes its bounded contract when it has the requested dimensions and every entry is an integer in the stated range, not when it matches this table.
Example 2: a smaller classroom grid
Use =RANDARRAY(2,3,0,9,TRUE) in a separate 2-by-3 result area. It requests six integers, each from 0 to 9. A possible arrangement is 4, 0, 8 on the first row and 4, 7, 1 on the second. Repeated values such as 4 are compatible with this request: random generation does not mean sampling without replacement.
This is useful for disposable training exercises or mock spreadsheet data. It is not a documented cryptographic random generator, a guaranteed unique-code generator, or evidence that generated telephone-like digits correspond to safe real contact details. Prefer anonymous numeric test matrices.
Refreshing and preserving a sample
The official lesson demonstrates refreshing the random grid with F9. After refresh, validate the dimensions and range again; do not expect the same digits. A refresh can coincidentally repeat some values, so one unchanged cell does not prove that recalculation failed.
If a report needs an immutable sample, preserve an approved values-only copy and label it as a sample rather than leaving a live random formula as its evidence. Verify the copy in the intended application; no paste-special behavior is claimed as tested here.
Troubleshooting and boundaries
- Check row/column order if the result rectangle appears transposed.
- Use TRUE for this integer fixture; decimal-generation endpoints and defaults are not established here.
- Do not treat duplicates as an error or use this formula alone for unique identifiers.
- Invalid dimensions, reversed bounds, distribution guarantees and maximum sizes remain outside this source-bounded guide.
Use SEQUENCE when the numbers must be deterministic and consecutive. Use UNIQUE to inspect repeated values, while remembering that removing duplicates also changes the number of results.
References and verification
Expected outputs are derived from the explicit fixtures and documented operation. They are not results observed in an installed WPS build. Check the intended edition before relying on these formulas in a shared workbook.