ExcelExcel 2021+
RANDARRAY function in Excel
Returns an array of random numbers between 0 and 1. However, you can specify the number of rows and columns to fill, minimum and maximum values, and whether to return whole numbers or decimal values.
=RANDARRAY([rows], [columns], [min], [max], [whole_number])RANDARRAY syntax and parameters
Five arguments, zero required.
- rowsnumberOptional
The number of rows to be returned
- columnsnumberOptional
The number of columns to be returned
- minnumberOptional
The minimum number you would like returned
- maxnumberOptional
The maximum number you would like returned
- whole_numberbooleanOptional
RANDARRAY examples
Formulas you'll actually reuse.
Ten random whole numbers from 1 to 100 as a column (TRUE = integers):
=RANDARRAY(10, 1, 1, 100, TRUE)Shuffle a list — sort it by a column of random keys:
=SORTBY(A2:A50, RANDARRAY(ROWS(A2:A50)))
RANDARRAY in Google Sheets
Same name — your formula ports as-is.
Try RANDARRAY in the playground
Edit the example — nothing to install.
Preloaded with the RANDARRAY formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets
- ACOSHReturns the inverse hyperbolic cosine of a numberMathGoogle Sheets
- ACOTReturns the arccotangent of a numberMathGoogle Sheets
- ACOTHReturns the hyperbolic arccotangent of a numberMathGoogle Sheets
- AGGREGATEReturns an aggregate in a list or databaseMathNo Google Sheets equivalent