Exceljet

Quick, clean, and to the point

Excel RANDARRAY Function

Excel RANDARRAY function
Summary 

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.

Purpose 
Get array of random numbers
Return value 
Array of random values
Syntax 
=RANDARRAY ([rows], [columns], [min], [max], [integer])
Arguments 
  • 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.
Usage notes 

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)
Note: The RANDARRAY function is a new "Dynamic Array Function" in Excel. It is a beta feature available only through the Office Insiders program. Dynamic Array functions are expected to be released in 2019 to Office 365 subscribers.

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.