Lower bound check
| A | |
|---|---|
| 1 | Check |
Formula: C2: =RAND()>=0
Result: TRUE
Every generated value is at least zero.
RAND in Google Sheets is volatile: it gives a new number on every recalculation, and the Calculation setting under File, Settings decides whether that also happens every minute or every hour.
RAND()A fixed random value needs Paste special, Values only.
For a fuller explanation of the arguments and common errors, see the RAND Excel guide.
| A | |
|---|---|
| 1 | Check |
Formula: C2: =RAND()>=0
Result: TRUE
Every generated value is at least zero.
| A | |
|---|---|
| 1 | Check |
Formula: C2: =RAND()<1
Result: TRUE
The upper endpoint one is excluded.
| A | |
|---|---|
| 1 | Width |
| 2 | 0 |
Formula: C2: =10+RAND()*A2
Result: 10
A zero width keeps this verification stable while showing the usual lower + RAND()*width pattern.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in D2: =RAND()
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Number | Step | Result | |
| 2 | 1234.567 | 50 | 0.064242551837 | |
| 3 | 17 | 5 | ||
| 4 | -4.7 | 12 | ||
| 5 | 144 | 9 | ||
| 6 | 2.5 | 3 | ||
| 7 | 50 | 12 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page