π― What You'll Learn
- Use
SEQUENCEto generate dynamic number arrays that grow with your data - Combine
SEQUENCEwithHSTACKto attach automatic row numbers to any dataset - Build ranked leaderboards, date series, countdowns, and grids
- Reverse a list and generate an alphabet using clever SEQUENCE tricks
- Avoid brittle hardcoding by using
ROWS()for truly dynamic formulas
π Before You Begin
- Comfortable entering and editing formulas in Excel or Google Sheets
- Basic understanding of cell references (e.g.,
A2:A100) - Familiarity with what a function is and how arguments work
- Optional: exposure to SORT or INDEX will help with later examples
The Core Syntax
Dynamic arrays in Excel and Google Sheets let a single formula produce many values at once. SEQUENCE is the engine behind most of them.
SEQUENCE(rows, [columns], [start], [step])
The most powerful habit: replace a fixed number with ROWS(your_range). This makes the sequence breathe with your data.
=SEQUENCE(5, 1, 10, -2) -- 5 rows, 1 col, start at 10, step -2
10 β 8 β 6 β 4 β 2
Why SEQUENCE Changes Everything
Before SEQUENCE, numbering rows meant typing 1, 2, 3 manually or dragging a fill handle. Here's why that breaks β and why SEQUENCE fixes it.
How SEQUENCE Generates an Array
Think of SEQUENCE like a factory conveyor belt. You set the settings once β how many items, where to start, how far apart β and the belt fills the cells automatically.
12 Real-World Examples
Click any example to expand the formula and see why it works.
ROWS(A2:A100) returns however many rows exist. SEQUENCE generates 1 to that count. HSTACK glues the numbers to your data. Add a row β numbers auto-update.& operator concatenates text to each number. Produces USR-100, USR-101 β¦ USR-119. Great for mock data and prototypes.Pro Tips
π The HSTACK Marriage
- Combining SEQUENCE with HSTACK is the go-to way to attach row numbers to a dataset that has no built-in index column in the source.
- The result is a clean numbered table that updates live as rows are added or removed.
π Never Hardcode the Row Count
- Always use
ROWS(your_range)instead of a fixed number like100. - If your range is a named Table, use
ROWS(Table1)β the sequence will expand the moment you tab into a new row.
π The Zero Step Edge Case
- A step of 0 repeats the start value for every position. Rarely useful, but it won't throw an error.
- For dates, the step is always measured in days. Use
EDATEwrapped around SEQUENCE when you need exact same-day-of-month jumps.
Test Your Understanding
Apply what you learned β these questions test real-world scenarios, not definitions.
1. You delete 3 rows from your list. You used =HSTACK(SEQUENCE(ROWS(A2:A100)), A2:A100). What happens to the row numbers?
2. A colleague wants every second Friday of every month for 2026. Which formula approach would you suggest?
3. You need a 10Γ10 grid of numbers (1β100). What single formula achieves this?
4. A user reports their alphabetical sequence =CHAR(SEQUENCE(26,1,65)) is suddenly showing numbers instead of letters. Where would you look first?
π Summary
- SEQUENCE generates arrays of numbers β dynamic, no fill handle needed
- Use
ROWS(range)instead of a fixed number so your formula grows with your data - Combine with HSTACK for auto-numbered tables, SORT for leaderboards, INDEX for reversals
- Use DATE() as the start value to create date sequences; step is always in days
- For exact monthly jumps, wrap SEQUENCE inside EDATE instead of using a fixed step