
Section: Excel & Google Sheets
SEQUENCE in Excel builds a run of numbers with one formula. Type =SEQUENCE(10) and you get 1 to 10 down a column. Add rows, columns, a start value and a step, and the same function produces a numbered list, a grid, a set of dates or a countdown. It is one of the dynamic array functions, so the result spills into the cells below and to the right, and it resizes itself when the arguments change. This guide covers the syntax, the useful patterns and the errors you will meet. Sample data is made up.
SEQUENCE function in Excel: syntax
=SEQUENCE(rows,[columns],[start],[step])
Rows is required. Columns, start and step are optional and default to 1. So =SEQUENCE(5) returns five rows of one column starting at 1 and stepping by 1. =SEQUENCE(4,5) returns a 4 row by 5 column grid, numbered across each row, which is exactly the example Microsoft uses in its own documentation.
First examples
=SEQUENCE(12)gives 1 to 12 down a column, handy for month numbers.=SEQUENCE(1,12)gives the same numbers across a row, which is what you want for a header line.=SEQUENCE(10,1,0)starts at 0, so you get 0 to 9.=SEQUENCE(10,1,100,10)starts at 100 and steps by 10, giving 100, 110, 120 and so on.=SEQUENCE(10,1,10,-1)counts down from 10 to 1.

How the spill works
A dynamic array formula writes its result into the cells below it. Those cells are the spill range. Click any cell in the range and Excel draws a blue border around the whole block. Existing spill cells cannot be edited individually. A #SPILL! error occurs when something occupies the intended output area, for example after the required size grows. Clear the obstruction and the formula can spill again. To refer to the whole spilled range in another formula, use the spilled range operator, the hash sign: if the formula sits in A2, then A2# refers to the entire block, however many rows it grows to.
Build a list of dates
Combine SEQUENCE with DATE and TODAY to make a date series that starts in January of the current year:
=DATE(YEAR(TODAY()),SEQUENCE(1,6),1)
The SEQUENCE part supplies month numbers 1 to 6. DATE returns the first day of January through June in the current year. Wrapping the whole thing in TEXT with the format "mmm" gives month labels instead of serial numbers, which is the pattern Microsoft shows for a dynamic header row. For a daily list, use =TODAY()+SEQUENCE(30)-1 to get the next 30 days, then format the column as a date.

Number a table automatically
For a contiguous list with no internal blanks in B2:B1000, =IF(COUNTA(B2:B1000)=0,"",SEQUENCE(COUNTA(B2:B1000))) creates a compact counter. Place it outside an Excel Table and keep the spill area clear. These are positional numbers, not permanent record IDs: inserting, deleting or sorting source records can change their association. Use a stored ID when identity must remain stable. For a list of distinct source values, see UNIQUE.
Use it inside other formulas
SEQUENCE returns an array, so it feeds anything that accepts one. =SUM(SEQUENCE(100)) adds 1 to 100. =INDEX(A2:A50,SEQUENCE(3)) returns the first three items from a list. =TEXTJOIN(", ",TRUE,"Item "&SEQUENCE(5)) produces a single string of five labelled items, which is useful for building test data or a checklist in one cell. The same idea works with lookup formulas, so the numbering can drive an index into a table rather than just fill a column.

SEQUENCE compared with ROW and COLUMN
A filled formula such as =ROW()-1 numbers worksheet positions. SEQUENCE generates the list from one formula, but neither method creates immutable IDs. Use a suitable supported version before sharing a workbook that depends on spilling.
One formula, several outputs
Because the result is an array, you can nest SEQUENCE inside a function that expects a list of positions. A common pattern is a numbered index beside a lookup: use SEQUENCE to build the index column, then INDEX to pull the matching name from another table, the same idea as an INDEX MATCH formula. Another is a running count of days in a budget, where SEQUENCE supplies the day numbers and a second formula divides the monthly amount by the count of days. Neither needs a helper column filled by hand, and both shrink to one formula per block.
Availability
SEQUENCE needs a version that supports dynamic arrays: Excel for Microsoft 365, Excel 2024 and Excel 2021, plus the Mac, web and mobile versions listed by Microsoft. Older versions such as Excel 2016 and 2019 do not have it and return #NAME?. If a workbook using SEQUENCE is opened in an older version, the formula breaks for that user, so check before you share a file that depends on it. Google Sheets has its own SEQUENCE function with the same arguments, which makes the pattern easy to carry across.

Errors and fixes
- #SPILL! Something is in the way. Select the formula, look at the border, and clear the cells inside it.
- #NAME? The version does not support dynamic arrays, or the function name is misspelled.
- #VALUE! An argument is text instead of a number, or a row count is negative.
- Numbers appear as dates. The cell was formatted as a date before the formula ran. Set the format back to General or Number.
- The formula is slow on a huge range. SEQUENCE of a million rows is a million values. Keep the count tied to the data, not to a round number far above it.
Questions and answers
What is the difference between SEQUENCE and the fill handle?
Dragging a number series with the fill handle writes values; dragging a formula copies formulas. SEQUENCE writes one formula whose result spills, so it updates when the arguments change.
Can I use SEQUENCE for letters instead of numbers?
Not directly. Use CHAR with SEQUENCE, for example =CHAR(SEQUENCE(26,1,65)) to get A to Z.
Does SEQUENCE work in Google Sheets?
Yes, with the same four arguments. The spill behaviour is the same as well.
Can I sort or filter a spilled range?
Yes. Use the hash reference, such as SORT(A2#), and the result follows the size of the original range.
Why does my formula show a single number?
The file may be in a mode or version without dynamic arrays, or the formula was entered as a legacy array formula. Check the version first.
