The RANDARRAY function takes five arguments, none of which are required: rows, columns, min, max, and integer. By default, rows, columns, and max default to 1, while min defaults to zero and integer defaults to FALSE. Without any arguments, RANDARRAY will return a decimal value between 0 and 1: Use rows and columns to control the number of values returned: Use min and max to set a lower and upper threshold for values. For example, to generate 3 random decimal values in rows between 1 and 5: Set integers to TRUE to return whole numbers. For example, to generate 3 random whole numbers in rows between 1 and 100:


In the example shown, RANDARRAY is used to generate 50 values in a range of 10 rows by 5 columns. The formula in B4 is: To return a random array of integers, 5 rows by 2 columns,  between 1 and 10, you can use a formula like this:

Random text

To generate a random letter between A-Z you can use the CHAR function with RANDARRAY: You can also generate random text strings with RANDARRAY.

Random dates

To generate 5 random dates in the next year, you can use a formula that combines RANDARRAY with the EDATE and TODAY functions:

Dave Bruns

Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.