Auto-Number Lists Dynamically with SEQUENCE

In Formulas•By M. Ichsanul Fadhil•Updated 2026-12-02

Typing 1, 2, 3 down a column or dragging the fill handle works fine until you insert a row, delete someone, or add new names at the bottom. Suddenly your numbering has gaps or stops short, and you're back to fixing it by hand.

Instead of babysitting row numbers, you can pair SEQUENCE with COUNTA. One single formula counts how many names exist in your list and generates the exact numbering automatically.

Step1

Start SEQUENCE and Nest COUNTA Inside It

Start typing =SEQUENCE(COUNTA( in cell B2

Click the first empty cell under your Numbers header (B2 in our sheet) and type =SEQUENCE(COUNTA(. Excel's tooltip pops up showing COUNTA(value1, [value2], ...), which counts every non-empty cell in the range you pick next.

Unlike COUNT, which only counts numbers, COUNTA counts text names too—making it the ideal partner for a roster or task list.

Step2

Reference Your Names Column and Press Enter

Press Enter to spill numbers 1 to 5 down the Numbers column

Select your names range—for example, C2:C100 so you have plenty of room for future names—close both parentheses so it reads =SEQUENCE(COUNTA(C2:C100)), and press Enter. Excel immediately spills 1, 2, 3, 4, 5 down the column.

One quick tip: avoid referencing the entire column like C:C unless you subtract 1 (COUNTA(C:C)-1), otherwise COUNTA counts your Names header too and spills one extra number at the bottom.

Step3

Add a New Name to Watch It Auto-Update

Adding Rocky in row 7 automatically adds number 6

Because your formula watches C2:C100, try typing a new name—such as Rocky—into the next empty row. The moment you press Enter, COUNTA sees one more name and SEQUENCE automatically adds number 6 right beside it. You never have to drag a fill handle again.

Conclusion

Pairing =SEQUENCE(COUNTA(C2:C100)) turns static row numbers into a self-updating list. You type one formula in the top cell, and Excel handles the rest—even when new names are added or removed later.

Just make sure the cells below your SEQUENCE formula stay empty so Excel has room to spill the numbers down without throwing a #SPILL! error.

Share:

Try It Live in the Sheet

Loading Spreadsheet Playground...Initializing calculation engine
Try It Live Click anywhere to practice with pre-loaded data
Real-World Scenario

You're managing a growing team roster in Column B, and you need clean row numbers in Column A that don't break every time someone joins or leaves.

Use SEQUENCE paired with COUNTA in A2 to number A2:A6 automatically, and record the total headcount in C2.

Objectives
#1In A2:A6, generate sequential row numbers 1 to 5 using SEQUENCE and COUNTA.
#2In C2, use COUNTA to calculate the total number of names in B2:B6 (5).

Discussion & Questions

Be kind and constructive.
Loading discussion...

You Might Also Like