Generate numeric data by using RANDARRAY()
=RANDARRAY(5,1,1,6,TRUE)Five whole numbers from 1 to 6, spilled down from one cell. The arguments are rows, columns, the smallest and largest value, then TRUE for whole numbers.
What the MO-211 task asks
A RANDARRAY task in our MO-211 practice exams gives the size, the range and whole numbers: “In G4, generate 20 random blind-control IDs in one spill: 20 rows, 1 column, whole numbers between 10000 and 99999. Enter one formula; the values below spill on their own.”
The numbers change every time Excel recalculates, so no grader can check them one by one. Ours checks the shape and the bounds instead: a dynamic-array formula in the cell, a spill of exactly 20 rows and 1 column, and every value a whole number from 10000 to 99999.
That makes each argument count. Leave out TRUE and you get decimals; swap the size round and the spill is the wrong shape. Both score nothing even though the cells fill.
Worked examples
Type these into a blank sheet to follow along. Every result below is what Excel showed.
| A | |
|---|---|
| 1 | Roll |
| 2 | 1–6 |
| 3 | 1–6 |
| 4 | 1–6 |
| 5 | 1–6 |
| 6 | 1–6 |
=RANDARRAY(5)With no other arguments, RANDARRAY returns decimals from 0 up to 1, in one column.
=RANDARRAY(3,2,1,6,TRUE)Both ends are included: across 1,000 draws we saw every number from 1 to 6, and nothing else.
=RANDARRAY(4,1,10,20)Without TRUE, the values are decimals anywhere in the range.
=RANDARRAY(1,3,100000,999999,TRUE)One row and three columns spills to the right instead of down.
=RANDARRAY(2,2,6,1,TRUE)The minimum comes before the maximum. Swap them round.
=RANDARRAY(5,1,1,6,TRUE)The quick answer above, typed in A2. F9 recalculates and every number changes, while the shape and the range stay the same.
Watch it done in Excel
The last example above, recorded in real Excel on the same grid.
Exam traps
=RANDARRAY(2,2,1,6) returns decimals such as 2.11746. A task that says whole numbers needs TRUE as the fifth argument.
=RANDARRAY(3,1,1.5,3.5,TRUE) returns #VALUE!. With TRUE, give whole-number bounds.
A spill needs empty cells. If anything sits in the cells the result would fill, the formula shows #SPILL! until you clear them.
Copy and Paste Values does freeze the numbers, but the cell then holds a number, not a formula. A task that asks for one formula wants the formula left in place.
FAQ
Why do the numbers keep changing?
RANDARRAY draws new numbers every time the sheet recalculates: press F9, or type into any other cell, and they change. The shape and the range stay as you set them.
Can RANDARRAY repeat a number?
Yes. Each value is drawn on its own, so whole numbers from a small range repeat often: 1,000 draws from 1 to 6 used only those six numbers.
How is it different from RANDBETWEEN?
RANDBETWEEN, on MO-210, gives one whole number in one cell. RANDARRAY spills a whole block from one formula, and gives decimals unless you ask for whole numbers.
What if I leave out the columns?
Each missing argument takes its default: =RANDARRAY(3,,1,6,TRUE) spills 3 rows in 1 column.
New to this function?
This page covers what the exam asks. For the full how-to — every argument, more examples and a practice workbook — read our guide on dfwexcel.com.
The RANDARRAY function, explained — dfwexcel.comTry it under exam conditions
Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.
No credit card needed.
