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
| Row | A |
|---|---|
| 6 | Trial |
| 7 | 10 |
| 8 | 20 |
| 9 | 30 |
=INDEX(RANDARRAY(3,1,A7,A7,TRUE),1)Expected result10
See the inputs and instructions for all 3 examplesCopyable formulas
=INDEX(RANDARRAY(3,1,A7,A7,TRUE),1)=İ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 |