ExcelFlux

RANDARRAY function

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.

Math and trigonometry · Excel 2021+

Where can you use it?

Reporting, manufacturing and engineering teams. When a total, rounding step or numerical transformation is needed, use the example to see which operation fits your inputs.

Scenario in the workbook

Create an integer array with equal boundaries, then inspect its first item. Different bounds permit random values.

A worked example from the workbook

RowA
6Trial
710
820
930
Record 1
=INDEX(RANDARRAY(3,1,A7,A7,TRUE),1)

Expected result10

See the inputs and instructions for all 3 examples

Copyable formulas

English Excel · en-US
=INDEX(RANDARRAY(3,1,A7,A7,TRUE),1)
Turkish Excel · tr-TR
=İNDİS(RASGDİZİ(3;1;A7;A7;DOĞRU);1)

Worked examples

Create an integer array with equal boundaries, then inspect its first item. Different bounds permit random values.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Trial
7 10
8 20
9 30
Case Formula Expected result
Record 1 =INDEX(RANDARRAY(3,1,A7,A7,TRUE),1) 10
Record 2 =INDEX(RANDARRAY(3,1,A8,A8,TRUE),1) 20
Record 3 =INDEX(RANDARRAY(3,1,A9,A9,TRUE),1) 30
Microsoft Excel reference