Returns an array of random numbers between 0 and 1 or within a specified range.
Cú pháp
RANDARRAY([rows], [columns], [min], [max], [whole_number])Đối số
rowstùy chọn
The number of rows to return.
columnstùy chọn
The number of columns to return.
mintùy chọn
The minimum number to return.
maxtùy chọn
The maximum number to return.
whole_numbertùy chọn
TRUE for integers, FALSE for decimals.
The RANDARRAY function generates a dynamic array of random numbers. You can specify the dimensions of the array, the range of values, and whether the results should be integers or decimals.
=RANDARRAY(2, 2, 1, 10, TRUE)→{3, 8; 5, 2}Generates a 2x2 array of random integers between 1 and 10.
Select a cell
Click on the cell where you want the array to start.
Enter the formula
Type =RANDARRAY followed by your desired dimensions and range parameters.
RANDARRAY is a volatile function that recalculates whenever the worksheet changes.