ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. The SEQUENCE Function in Excel

The SEQUENCE Function in Excel

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

SEQUENCE creates a list of numbers that spills into neighbouring cells. =SEQUENCE(10) returns 1 to 10 down a column. The full form is =SEQUENCE(rows, [columns], [start], [step]), so =SEQUENCE(5,1,100,10) gives 100, 110, 120, 130, 140. It works with dates and other functions, and needs Excel 2021, Excel 2024 or Microsoft 365.

Key takeaways

  • =SEQUENCE(rows, [columns], [start], [step]); only rows is required.
  • Start and step default to 1; use a negative step to count down.
  • Add SEQUENCE to a date to list days, or feed it to EDATE to list months.
  • =SEQUENCE(ROWS(F2#)) numbers a spilled list and resizes with it.
  • SEQUENCE needs Excel 2021, Excel 2024 or Microsoft 365; older versions show #NAME?.
On this page+
  1. What does the SEQUENCE function do?
  2. How to use SEQUENCE: basic examples
  3. How to number rows with SEQUENCE
  4. How to number a spilled FILTER or SORT result
  5. How to make a list of dates with SEQUENCE
  6. How to build IDs and labels with SEQUENCE
  7. Common SEQUENCE problems
  8. SEQUENCE alternatives in older Excel
  9. Practise it

The Excel SEQUENCE function creates a list of sequential numbers with one formula: =SEQUENCE(10) fills ten cells with 1 to 10. It can count by any step, run across columns, and generate dates, which makes it a building block for numbered lists, calendars and top-N reports. This guide explains each argument with examples for anyone using Excel 2021, Excel 2024 or Microsoft 365.

What does the SEQUENCE function do?#

SEQUENCE returns an array of numbers that spills into the cells around it. You type the formula once, in one cell, and Excel fills the rest. If you change the formula, the whole list updates.

Excel formula
=SEQUENCE(rows, [columns], [start], [step])
ArgumentWhat it meansDefault
rowsHow many rows to fillRequired
columnsHow many columns to fill1
startThe first number1
stepHow much to add each time1

SEQUENCE is a dynamic array function, like FILTER and SORT. If spilling is new to you, read dynamic arrays explained simply first.

Version note: SEQUENCE needs Excel 2021, Excel 2024, Microsoft 365 or Excel for the web. Excel 2019 and older show #NAME?.

How to use SEQUENCE: basic examples#

The four arguments cover most numbering jobs.

FormulaResult
=SEQUENCE(5)1, 2, 3, 4, 5 down a column
=SEQUENCE(1,5)1 to 5 across a row
=SEQUENCE(5,1,100,10)100, 110, 120, 130, 140
=SEQUENCE(4,1,0,-1)0, -1, -2, -3
=SEQUENCE(2,3)A 2 × 3 grid: 1 2 3 / 4 5 6

Skip an optional argument by leaving it empty between commas. =SEQUENCE(5,,10) starts at 10 and keeps the default of one column and a step of 1.

In a grid, SEQUENCE fills across first, then down: the first row is 1, 2, 3 and the second is 4, 5, 6. To fill down first, wrap it in TRANSPOSE and swap the sizes, =TRANSPOSE(SEQUENCE(3,2)). Our guide to TRANSPOSE explains how flipping works.

How to number rows with SEQUENCE#

Use SEQUENCE for a numbered list that doesn't break when you sort or delete rows. Here are six applicants:

ABC
1No.ApplicantScore
21Priya Shah82
32Tom Becker76
43Aisha Khan91

In A2, type =SEQUENCE(6). The numbers 1 to 6 spill down to A7. To match the list length automatically, count the names instead of typing 6:

Excel formula
=SEQUENCE(COUNTA(B2:B100))

COUNTA counts the non-empty cells in B2:B100, so the numbering grows when you add an applicant. Keep the names in one unbroken block: a gap in the middle still counts the names after it, but the numbers won't line up with the rows.

How to number a spilled FILTER or SORT result#

Point SEQUENCE at the spill with ROWS and the # spill reference. If a FILTER in F2 spills the passing candidates:

Excel formula
=SEQUENCE(ROWS(F2#))

F2# means "everything F2 spilled", and ROWS counts its rows. When the filter returns more or fewer rows, the numbering resizes with it. The FILTER function guide shows how to build the list itself.

How to make a list of dates with SEQUENCE#

Dates are numbers in Excel, so SEQUENCE can count in days. Start at a date and step by 1 for every day, or by 7 for every week:

Excel formula
=SEQUENCE(7,1,DATE(2025,1,6),1)

This lists seven days from Monday, January 6, 2025. With a step of 7, =SEQUENCE(4,1,DATE(2025,1,6),7) lists four Mondays in a row. Format the results as dates, or you'll see serial numbers like 45663.

Months have different lengths, so you can't step by 30. Feed SEQUENCE to EDATE instead:

Excel formula
=EDATE(DATE(2025,1,1),SEQUENCE(12,1,0))

SEQUENCE(12,1,0) produces 0 to 11, and EDATE adds each number of months to January 1, giving the first day of every month in 2025.

How to build IDs and labels with SEQUENCE#

Join text to SEQUENCE with & to create a batch of codes:

Excel formula
="INV-"&SEQUENCE(5,1,101)

This returns INV-101 to INV-105. For codes with leading zeros, format the number first: ="EMP-"&TEXT(SEQUENCE(5),"000") gives EMP-001 to EMP-005.

SEQUENCE also works inside other functions. =SUM(SEQUENCE(10)) adds 1 to 10 and returns 55. And =INDEX(SORT(A2:C9,3,-1),SEQUENCE(3),{1,3}) returns the first and third columns of the top three rows of a sorted table; our guide to a top 5 list with SORT and FILTER builds on that idea.

Common SEQUENCE problems#

Most issues come from the spill or the version:

  • #SPILL! A cell in the spill area isn't empty, or the formula sits inside an Excel table. Clear the cells or move the formula. Our guide to the #SPILL! error lists every cause.
  • #NAME? The file is open in Excel 2019 or older, which doesn't have SEQUENCE.
  • Serial numbers instead of dates. Format the spill as dates.
  • Wrong direction. =SEQUENCE(5) goes down; =SEQUENCE(1,5) goes across.
  • Numbers that don't change when you sort. That's by design: SEQUENCE always counts from the top. If you want each row to keep its number, paste the numbers as values first.

SEQUENCE alternatives in older Excel#

Without SEQUENCE, you can still number rows. Type 1 in the first cell, select the range, and choose Home > Fill > Series to fill a step value, or type 1 and 2 and drag the fill handle. For a formula, =ROW()-1 in row 2 returns 1 and counts up as you fill down.

To find where a value sits in a list rather than generating positions, use MATCH or XMATCH; see MATCH vs XMATCH. For sorting the numbered list, the guide to SORT and SORTBY covers both functions.

Practise it#

Try numbering the applicants in the exercise above. Then open the Modern Excel lesson to practise spill references like K2#, SORTBY and XMATCH, the functions SEQUENCE works best with, in a live spreadsheet.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Number the six applicants. In A2, use SEQUENCE to make the numbers 1 to 6 down the column.

fx
ABCD
1
No.
Applicant
Score
2
Priya Shah
82
3
Tom Becker
76
4
Aisha Khan
91
5
Mateo Ruiz
68
6
Lena Novak
88
7
Omar Haddad
79
8
9
10

Tip: SEQUENCE needs only one argument here: how many rows of numbers you want.

Practise this in a lesson

LessonModern Excel: XMATCH, SORTBY, TEXTSPLIT and spill references (A2#)Split names with TEXTSPLIT, find positions with XMATCH, sort by another column with SORTBY, and refer to a whole spilled result with A2#.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.

Frequently asked questions

What does SEQUENCE do in Excel?

+

SEQUENCE generates a list or grid of sequential numbers from one formula. =SEQUENCE(5) returns 1, 2, 3, 4 and 5 in five cells down a column.

How do I make SEQUENCE go across a row?

+

Set rows to 1 and columns to the length you want: =SEQUENCE(1,12) returns 1 to 12 across a row.

Can SEQUENCE create dates?

+

Yes. Dates are numbers, so =SEQUENCE(7,1,DATE(2025,1,6),1) lists seven days from January 6, 2025. Format the cells as dates to see them.

Why does SEQUENCE show #SPILL!?

+

Some of the cells it needs aren't empty. Clear the cells below or to the right of the formula, or move it to an empty area.

What can I use instead of SEQUENCE in older Excel?

+

Type the first number, then use Fill Series or drag the fill handle, or use =ROW()-1 in each cell to number rows.

Sources

  • SEQUENCE function - Microsoft Support
  • Dynamic array formulas and spilled array behavior - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the SEQUENCE function do?
  2. How to use SEQUENCE: basic examples
  3. How to number rows with SEQUENCE
  4. How to number a spilled FILTER or SORT result
  5. How to make a list of dates with SEQUENCE
  6. How to build IDs and labels with SEQUENCE
  7. Common SEQUENCE problems
  8. SEQUENCE alternatives in older Excel
  9. Practise it

Keep reading

Dynamic arrays· 6 min read

TRANSPOSE in Excel: Flip Rows and Columns

To transpose in Excel, copy the range, right-click the destination and choose Paste Special > Transpose. That makes a static copy with rows and columns swapped. For a copy that updates when the original changes, type =TRANSPOSE(A1:E2) in one cell; in Excel 2021 and Microsoft 365 it spills automatically.

Dynamic arrays· 6 min read

Dynamic Arrays in Excel Explained Simply

Dynamic arrays let one Excel formula return several values that spill into the cells below or beside it. Type =UNIQUE(B2:B9) in one cell and the whole list appears, then resizes when the data changes. They need Excel 2021, Excel 2024, Microsoft 365 or Excel for the web. Refer to a whole spill with a # after its first cell, such as E2#.

Dynamic arrays· 6 min read

SORT and SORTBY in Excel

SORT returns a sorted copy of a range: =SORT(A2:C9,3,-1) sorts by the 3rd column, largest first. SORTBY sorts one range by the values in another, so the column you sort by doesn't have to be in the result, and it handles several sort levels. Both leave the original data unchanged and need Excel 2021, Excel 2024 or Microsoft 365.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free