# Excel RANDARRAY Function

The Excel RANDARRAY function generates an array of random numbers between. The size or the array is is specified by **rows** and **columns** arguments. Generated values can be either decimals or whole numbers.

**rows**- [optional] Number of rows to return. Default = 1.**columns**- [optional] Number of columns to return. Default = 1.**min**- [optional] Minimum value to return. Default = 0.**max**- [optional] Maximum value to return. Default = 1.**integer**- [optional] Return whole numbers. Boolean, TRUE or FALSE. Default = FALSE.

The RANDARRAY function is a "Dynamic array function". RANDARRAY returns an array of random numbers between 0 and 1. The size or the array is determined by supplied **rows** and **columns** arguments. The values generated by RANDARRAY can be either decimal values or whole numbers. When RANDARRAY returns multiple results in a worksheet, results will spill into adjacent cells.

### Example #1

In the example shown, RANDARRAY is used to generate 50 values in a range10 rows by 5 columns. The formula in B4 is:

=RANDARRAY(10,5)

### Example #2

To return a random array of integers, 5 rows by 2 columns, between 1 and 10, you can use a formula like this:

=RANDARRAY(5,2,1,10,TRUE)