Creating Random Data With RANDARRAY
Produce arrays of random numbers for samples and testing.
What RANDARRAY Does
Need a block of random numbers for testing, sampling, or a quick simulation? The RANDARRAY function generates an entire array of random values from one formula.
Older spreadsheets had RAND (one random decimal) and RANDBETWEEN (one random integer). RANDARRAY rolls both ideas into a single spill function that fills as many cells as you ask for.
=RANDARRAY(5, 1)The RANDARRAY Syntax
RANDARRAY accepts up to five arguments, all optional:
- rows how many rows to fill (default 1)
- columns how many columns (default 1)
- min the smallest value (default 0)
- max the largest value (default 1)
- whole_number TRUE for integers, FALSE for decimals (default FALSE)
With no arguments at all, it returns a single random decimal between 0 and 1.
=RANDARRAY(rows, [columns], [min], [max], [whole_number])All lessons in this course
- Ordering Results With SORT
- Sorting by Another Column With SORTBY
- Generating Numbers With SEQUENCE
- Creating Random Data With RANDARRAY