In this worksheet, let’s generate 20 random times between 7:00 AM and 6:00 PM.
To do this, we’ll use theRANDARRAY function.
Now, RANDARRAY can generate both integers and decimal values.
For Times, we want decimal values, because Excel times are fractional values of one day.
In cell C6, I’ll enter 20 since we want a total of 20 times.
Now I’ll enter the RANDARRAY function in cell E5.
Therows argument corresponds to the number of times we want, so this value comes from cell C6.
Forcolumns, we want 1.
Formin,we want the start time in C4.
Formax,we want the end time in C5.
When I enter the formula, RANDARRAY generates 20 random times between 6:00 AM and 7:00 PM.
These values must be formatted as times.
Now I can change the inputs any way I like.
I’ll undo these changes.
To sort these times in order, I can wrap theSORT functionaround the RANDARRAY function.