# How to generate a sequence of numbers in Excel

Use SEQUENCE(rows, columns, start, step): `=SEQUENCE(B1,1,B2,B3)` returns `B1` numbers starting at `B2`, counting up by `B3`.

**Excel:** `=SEQUENCE(B1,1,B2,B3)` (Excel 2021, 2024 and Microsoft 365)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D |
| --- | --- | --- | --- |
| How many | 10 |  | Ticket numbers |
| Start at | 100 |  |  |
| Step | 5 |  |  |

Formula in D2: `=SEQUENCE(B1,1,B2,B3)`

Result (spills 10 × 1): 100; 105; 110; 115; 120; 125; 130; 135; 140; 145

## How it works

SEQUENCE builds the whole list in one formula: 10 rows, 1 column, starting at 100, adding 5 each step. Change any of the three inputs and the list redraws, so there's nothing to drag or refill.

## Other ways

- `=B2+(SEQUENCE(B1)-1)*B3`: The same list from SEQUENCE's default 1, 2, 3: handy when the step is a calculation.
- `=SEQUENCE(1,B1,B2,B3)`: Swap the first two arguments to fill across a row. (The same ten numbers in one row.)

## Common mistakes

- The order is rows, then columns. `SEQUENCE(1,10)` fills a row; `SEQUENCE(10)` fills a column.
- A decimal step such as 0.1 can show tiny rounding errors (0.30000000000000004) in calculations. Wrap it in ROUND if you compare the values.

## Questions

**How do I count down?**

Use a negative step: `=SEQUENCE(10,1,10,-1)` gives 10 down to 1.

**How do I make a grid of numbers?**

Give rows and columns: `=SEQUENCE(5,4)` numbers a 5 by 4 block from 1 to 20, row by row.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-10-30.

Source: https://spreadsheetpractice.com/formulas/generate-a-sequence-of-numbers
