Generate random numbers in Excel with RANDARRAY

Use Excel's RANDARRAY function to create dynamic lists or ranges of random numbers. This guide explains the function's arguments and shows how to produce decimal or whole random values and fix them as static values.

What the video covers

Create dynamic random numbers or arrays in Excel using the RANDARRAY function. Covers setting rows, columns, minimum/maximum values, returning integers, and converting results to static values.

Watch the video on YouTube

Step-by-step instructions

  1. Select the output cell
    Click the cell where you want the top-left corner of the random array to appear.
  2. Enter the RANDARRAY formula basics
    Type =RANDARRAY( then provide the number of rows and columns you want, separated by a comma (for example: =RANDARRAY(10,3)).
  3. Optional: set minimum and maximum values
    After rows and columns, add the minimum and maximum values to scale the results (for example: =RANDARRAY(10,3,1,100) produces numbers between 1 and 100).
  4. Optional: return whole numbers
    Add TRUE as the final argument to return integers instead of decimals (for example: =RANDARRAY(10,3,1,100,TRUE)). Then close the parentheses and press Enter.
  5. Work with the dynamic array
    Excel will spill the array into adjacent cells. The values update whenever the sheet recalculates. If you want to keep a fixed snapshot, copy the spilled range and use Paste Values to replace the formulas with static numbers.

Watch the video

Video thumbnail for Generate random numbers in Excel with RANDARRAY Play tutorial

Watch on YouTube

Why it matters

RANDARRAY produces whole ranges of random values in a single formula and updates automatically when the workbook recalculates. It's useful for testing, simulations, sample data, or quick randomized lists without manual entry.

Check your result

After pressing Enter the target range should fill with random numbers. Recalculating the sheet (for example by editing a cell or pressing F9) will change the numbers unless you convert them to values.

Troubleshooting

If only one cell shows a value, ensure your formula includes the desired row and column counts. If results don't change on recalculation, calculation mode may be set to Manual—set it to Automatic. To keep numbers from changing, copy the array and use Paste Values to lock them as static numbers.