Lessons Lesson 88

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.

By the end you can

  • generate a number series with SEQUENCE.
  • sum or read a series without typing it out.

Practises SEQUENCE SUM INDEX ROW

By Ali, Founder, Excel Lessons

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.

Read more about this

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.

Type a formula

In D2, type:

=SEQUENCE(5)

D2
Row A B C D E F G
1 Instalments 12 First five Sum of 1 to 10
2 First payment 100
3 Rises by 50 Third payment
4
5 Total paid
6
7
8

Every step

  1. 1

    In D2, type: =SEQUENCE(5).

    Hint. Just one argument: 5.

  2. 2

    In E2, add up the numbers 1 to 10 with SUM around SEQUENCE.

    Hint. SUM of SEQUENCE(10).

  3. 3

    SEQUENCE takes rows, columns, a start and a step. In E4, use INDEX to take the third instalment out of a SEQUENCE.

    Hint. Count, columns, start and step, then position 3.

  4. 4

    In E6, total every instalment. Put SUM around SEQUENCE.

    Hint. SUM of the SEQUENCE.

  5. 5

    Read =INDEX(SEQUENCE(4,1,2024),3) and say what it returns.

    Hint. SEQUENCE counts up from 2024 in steps of one. INDEX takes the third.