RAND in WPS Spreadsheet: Random Values and Correct Range Bounds
Generate random decimals and integers with RAND, understand recalculation, and avoid endpoint and rounding mistakes.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer
=RAND() returns a random number at least 0 and less than 1. It has no arguments. The official lesson says a new value is generated when the worksheet recalculates and gives F9 as a recalculation shortcut in its WPS 2019 walkthrough.
There is no fixed correct output such as 0.42 to reproduce. The checks below concern permitted ranges and arithmetic transformations; they are not captured random draws from WPS.
Syntax
RAND()
Use ordinary keyboard parentheses with nothing between them. The source displays typographic full-width parentheses in its prose; the formulas here use standard formula punctuation.
Worked worksheet: random test durations
Put Lower bound in A1, Upper bound in B1 and Random duration in C1. Enter 10 in A2 and 50 in B2. In C2 enter:
=RAND()*(B2-A2)+A2
Expected range: 10 ≤ C2 < 50. Copy the input values and formula down if you need several simulated records. Each cell’s realized value is unknown in advance and can change on recalculation.
For an arithmetic illustration only, if the underlying draw were 0.25 the formula would give 20; a hypothetical draw of 0.9 would give 46. These are conditional examples, not observed or promised outputs.
Common transformations
| Formula | Mathematical output range |
|---|---|
=RAND() |
At least 0, below 1 |
=RAND()*100 |
At least 0, below 100 |
=RAND()*40+10 |
At least 10, below 50 |
=INT(RAND()*40+10) |
Integers 10 through 49 |
The lesson informally describes the last range as 10 to 50. Its displayed formula excludes 50. For integers from 10 through 50 inclusive, use the derived expression =INT(RAND()*41)+10. This follows from 0 ≤ RAND() < 1 and the 41 possible integer outcomes; it is not a claim of native statistical testing.
Advanced example: one draw shared by paired scenarios
Enter =RAND() in E2. In F2 enter =10+40*E2 and in G2 enter =50-40*E2. These two durations sum to 60 because they reuse the same underlying draw.
For a hypothetical E2 of 0.25, F2 is 20 and G2 is 40. If you instead place separate RAND() calls in F2 and G2, the constant-sum identity no longer follows. Reusing a helper cell makes the intended dependency explicit, though E2 itself remains volatile.
Rounding and troubleshooting
- A result displayed as 1.00 can still contain a value below 1. Formatting changes what you see.
ROUND(RAND(),2)instead changes the computed result and can actually return 1. - A recalculation can change the data used by downstream totals or comparisons. If you need a fixed record, preserve the generated values using your editor’s values-only paste and check that the cells no longer contain RAND formulas before relying on the snapshot. Exact menu labels vary by build.
- Repeated displayed values are possible, especially with few decimal places. The source’s informal claim that each value differs is not a guarantee that duplicates can never occur.
- Do not reverse the bounds accidentally. The examples assume the upper bound exceeds the lower bound.
- A small random sample need not look evenly distributed. The reviewed source establishes no cryptographic suitability, reproducible seed control or finite-precision unbiased-sampling guarantee. Do not use these examples as a security-token generator.
Availability and verification
The official WPS RAND lesson was fetched afresh on October 19, 2026. Its edition banner says WPS Office for Windows Personal. The lesson dates from 2019; it does not establish introduction or retirement dates, exact build coverage, or current Mac, Linux, web and mobile behavior. The RAND walkthrough explicitly refers to WPS 2019. Examples are independently calculated expectations, not observed WPS outputs. Native execution and genuine current-application screenshots remain unverified.
Related guides
INT, ROUND, SUM. Browse the WPS function library.