Skip to content
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.

  1. Ten random whole numbers from 1 to 100 as a column (TRUE = integers):

    =RANDARRAY(10, 1, 1, 100, TRUE)
  2. 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…