SEQUENCE
About this lesson
SEQUENCE generates a series of numbers as an array, from a count, a number of columns, a start and a step. Wrapped in SUM or INDEX, it feeds another calculation without the numbers ever being typed.
- generate a number series with SEQUENCE.
- sum or read a series without typing it out.
The idea
A list of numbers that nobody has to type. SEQUENCE(5) is 1 to 5. SEQUENCE(12,1,100,50) is twelve payments rising by fifty. SEQUENCE(4,1,2024) is four years of headings. In Excel 365 the series spills. Inside SUM or INDEX it stays a single number, which is the form most sheets need.
The mistake is the argument order. Rows, columns, start, step. A series that should run across a heading row needs its count in the second position, not the first. This grid, like older Excel, shows only the first value of a bare SEQUENCE.
The mistake to watch for
The argument order. Rows come first, then columns, then the start, then the step. So a series meant to run across a heading row needs its count in the second position. A SEQUENCE with the count in the wrong slot spills the wrong way and looks like a one-item list.
Where this comes up again
This lesson needs JavaScript to run. Everything below is the lesson in full, but you cannot type into the grid or be marked.
In D2, generate the numbers 1 to 5 with SEQUENCE. Excel would spill the whole list down the column from here. This grid does not spill, so it shows the first result only. The next steps wrap the array in a function that reads all of it.
To begin, type it exactly:
=SEQUENCE(5)
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Instalments | 12 | First number | ||||
| 2 | First payment | 100 | |||||
| 3 | Rises by | 50 | Sum of 1 to 10 | ||||
| 4 | |||||||
| 5 | Third payment | ||||||
| 6 | |||||||
| 7 | Total paid | ||||||
| 8 | |||||||
| 9 | Next year |
Every step
-
In
D2, generate the numbers 1 to 5 withSEQUENCE. Excel would spill the whole list down the column from here. This grid does not spill, so it shows the first result only. The next steps wrap the array in a function that reads all of it. To begin, type it exactly:=SEQUENCE(5). -
In
D4, add up the numbers 1 to 10:SUMaround aSEQUENCE. -
Payments start at the amount in
B2and rise by the amount inB3each time. InD6, find the third payment.SEQUENCEwith the count inB1, one column, the start, and the step. Read it at position 3 withINDEX. -
In
D8, the total of all twelve payments:SUMaround the sameSEQUENCE. -
Read
=INDEX(SEQUENCE(4,1,2024),3)and say what it returns.