Dynamic arrays
SEQUENCE function: generate dynamic row numbers and weekly date lists
Spill consecutive ticket numbers or 7-day inspection schedules from a single cell without dragging fill handles down the sheet.
Control count, start value, and step in one cell
SEQUENCE(rows, [columns], [start], [step]) builds a numeric array automatically. With 4 rows (B2), start 1001 (B3), and step 1 (B4), SEQUENCE spills 1001, 1002, 1003, 1004.
| Parameter | Cell | Value | Spilled item #4 |
|---|---|---|---|
| Rows | B2 | 4 | — |
| Start ID | B3 | 1001 | 1004 |
| Step | B4 | 1 for IDs; change to 7 for weekly dates | Start + 3 × step |
Generate invoice IDs or weekly Mondays
On a worksheet, =SEQUENCE(B2, 1, B3, B4) spills four IDs vertically. Changing B4 (step) to 7 and setting B3 to Monday 2 March 2026 (serial 46083) generates four consecutive Mondays: 46083, 46090, 46097, and 46104 (23 March 2026).
Because the compact lesson preview displays one cell, the practice formula wraps SEQUENCE in INDEX(..., 4, 1) to inspect the fourth generated entry.
=INDEX(SEQUENCE(B2,1,B3,B4),4,1)Sum or count a generated series directly
Dynamic arrays feed straight into aggregate functions: =SUM(SEQUENCE(4, 1, 1001, 1)) adds 1001 + 1002 + 1003 + 1004 = 4010 without needing helper cells.
=SUM(SEQUENCE(B2,1,B3,B4))Try the example
Use the original values or change them to test your understanding.