How to Use SEQUENCE Function in Excel: Syntax and Examples
The
SEQUENCE function in Excel creates a list or array of sequential numbers. You can specify how many rows and columns to fill, the starting number, and the step between numbers using =SEQUENCE(rows, columns, start, step).Syntax
The SEQUENCE function syntax is:
- rows: Number of rows to fill with numbers.
- columns (optional): Number of columns to fill. Defaults to 1.
- start (optional): The first number in the sequence. Defaults to 1.
- step (optional): The increment between numbers. Defaults to 1.
excel
=SEQUENCE(rows, [columns], [start], [step])
Example
This example creates a 3-row by 4-column array starting at 5 and increasing by 2:
excel
=SEQUENCE(3, 4, 5, 2)
Output
5 7 9 11
7 9 11 13
9 11 13 15
Common Pitfalls
Common mistakes include:
- Not specifying the
rowsargument, which is required. - Forgetting that
columns,start, andstepare optional but must be in order if used. - Expecting the sequence to fill down columns first; it fills rows first.
excel
=SEQUENCE(,4) <em>(wrong: missing rows)</em> =SEQUENCE(3, , 5) <em>(wrong: skipping columns argument)</em> =SEQUENCE(3,4,5,2) <em>(correct)</em>
Quick Reference
| Argument | Description | Default |
|---|---|---|
| rows | Number of rows to fill | Required |
| columns | Number of columns to fill | 1 |
| start | Starting number of the sequence | 1 |
| step | Increment between numbers | 1 |
Key Takeaways
SEQUENCE generates arrays of numbers with customizable size and increments.
The rows argument is required; columns, start, and step are optional and must be in order.
The sequence fills numbers across rows first, then moves down columns.
Use SEQUENCE to quickly create number lists without manual entry.
Remember to specify all arguments in order if you skip optional ones.