Syntax
| Parameter | Description |
|---|
Examples
Random decimal
=RAND()
Random between 1 and 100
=RAND()*100
Random yes/no
=IF(RAND()>0.5, "Yes", "No")
Common Errors
RAND takes no arguments. Passing any argument like =RAND(1) will cause an error.
Tips
RAND recalculates on every sheet change. To keep specific random numbers, copy the cells and Paste Special > Values to replace formulas with static numbers.
Add a =RAND() column next to your data, sort by it, and take the top N rows for a random sample. Simple and effective.
RAND gives uniform random numbers. For normal distribution, use =NORM.INV(RAND(), mean, std_dev) to transform uniform to normal.
Try RAND in Viztab
Import your data and use RAND with 370+ other formulas. No signup required.
Open Viztab