RANDARRAY function in Excel
The RANDARRAY function in Excel is a powerful tool for generating arrays of random numbers. It was introduced in Excel 365 and Excel 2019. Here's a guide on how to use the RANDARRAY function effectively:
The basic syntax for RANDARRAY is:
=RANDARRAY([rows], [columns], [min], [max], [whole_number])
Rows (optional): The number of rows to fill with random numbers.
Columns (optional): The number of columns to fill with random numbers.
Min (optional): The minimum value in the array (for decimal numbers).
Max (optional): The maximum value in the array (for decimal numbers).
Whole_number (optional): If TRUE, generates whole numbers; if FALSE (or omitted), generates decimal numbers.
Examples
Generate a Single Random Number:
=RANDARRAY(1, 1)
This formula generates a single random decimal number between 0 and 1.
Generate a Random Array of Numbers:
=RANDARRAY(3, 4)
This formula generates a 3x4 array of random decimal numbers between 0 and 1.
Generate a Random Array with Whole Numbers:
=RANDARRAY(2, 3, 1, 10, TRUE)
This formula generates a 2x3 array of random whole numbers between 1 and 10.
Generate a Random Array with Decimal Numbers:
=RANDARRAY(2, 3, 5, 15, FALSE)
This formula generates a 2x3 array of random decimal numbers between 5 and 15.
Generate a Random Array with Specific Dimensions:
=RANDARRAY(5, 5, 1, 100, TRUE)
This formula generates a 5x5 array of random whole numbers between 1 and 100.
Important Points
Dynamic Update: RANDARRAY generates new random values each time the worksheet recalculates.
Array Formulas: The result of RANDARRAY is a dynamic array, meaning it can "spill" into multiple cells. Ensure that there is enough space for the entire array to be displayed.
By using RANDARRAY, you can efficiently generate random data for simulations, sampling, and more without needing additional helper columns or complex formulas.

Put Comment for quarry