Abstract
Transcript
In this video, we’ll introduce the SEQUENCE function.
One of the new functions that comes with the dynamic array version of Excel is SEQUENCE.
The SEQUENCE function takes fourarguments.
The first argument,rowscontrols how many rows SEQUENCE returns.
This argument is required.
The second argument,columns, controls the number of columns returned by SEQUENCE.Columnsis optional and defaults to 1.
The third argument is calledstart.
This is the starting point for the numbers returned by SEQUENCE, and can be any valid number.
The last argument isstep.Stepis the interval used between each number.
Thestepargument is optional and defaults to 1.
Let’s look at how these arguments work.
On this worksheet, we have a place to enterrows, columns, startandstep.
To begin with, I’ll set up the SEQUENCE function to userowsonly.
I’ll setrowsto 12.
Since the other three arguments all default to one, SEQUENCE returns aspill rangethat includes 12rowsand onecolumn.
These values start at 1, and are incremented by 1.
Next, I’ll connect the other arguments to the cells on the worksheet.
When I setcolumnsto 1, the error disappears.
I’ll go ahead and setstartandstepto 1 as well.
Now we can easily visualize the output from SEQUENCE.
If I use 2 or 3 forcolumns, we get a two-dimensional array.
If I use 5 forcolumns, we now have a grid that contains 60 numbers.
Notice the numbers increment across, then down.
Next, I’ll adjust thestartargument.Startcan be any valid number.
For example, I can use 10, 100, -100, or a decimal value.
Finally, let’s look at thestepargument, which controls the interval between numbers.
Likestart, this can be any valid number.
I can use zero, -1, 100, or, a decimal number like .01.