Generating an Array of Random Numbers with RANDARRAY
August 25, 2022 - by Bill Jelen

The syntax for RANDARRAY
is =RANDARRAY([rows],[columns],[min],[max],[integer])
. Notice that all five arguments are optional.
=RANDARRAY(10)
generates 10 rows and 1 column of=RAND()
=RANDARRAY(,5)
generates one row and five columns of=RAND()
=RANDARRAY(2,3,1,9,True)
generates 2 rows and 3 columns of=RANDBETWEEN(1,9)
Traditionally, =RAND()
returns a decimal greater than or equal to 0 and less than 1. Originally, RANDARRAY
would only return RAND
. A change in February 2019 added the Min, Max, and Integer arguments to allow RANDARRAY
to simulate RANDBETWEEN
.


This article is an excerpt from Power Excel With MrExcel
Title photo by Markus Krisetya on Unsplash