SEQUENCE function in Excel - auto generate number series
SEQUENCE function in Excel - auto generate number series
In this tutorial, you will learn how to create a number sequence in Excel with formulas. Additionally, we'll
show you how to auto generate a series of Roman numbers and random integers - all by using a new
dynamic array SEQUENCE function.
The times when you had to put numbers in sequence in Excel manually are long gone. In modern
Excel, you can make a simple number series in a �ash with the Auto Fill feature. If you have a more
speci�c task in mind, then use the SEQUENCE function, which is specially designed for this purpose.
It is a new dynamic array function introduced in Microsoft Excel 365. The result is a dynamic array that
spills into the speci�ed number of rows and columns automatically.
1 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
Where:
Step (optional) - the increment for each subsequent value in the sequence. It can be positive or
negative.
The SEQUENCE function is only supported in Excel for Microsoft 365, Excel 2021, and Excel for the
web.
SEQUENCE(n)
SEQUENCE(1, n)
For example, to populate a column with 10 incremental numbers, type the below formula in the �rst
cell (A2 in our case) and press the Enter key:
=SEQUENCE(10)
2 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
To make a horizontal sequence, set the rows argument to 1 (or omit it) and de�ne the number of
columns, 8 in our case:
=SEQUENCE(1,8)
If you'd like to �ll a range of cells with sequential numbers, then de�ne both the rows and columns
arguments. For instance, to populate 5 rows and 3 columns, you'd use this formula:
=SEQUENCE(5,3)
To start with a speci�c number, say 100, supply that number in the 3rd argument:
=SEQUENCE(5,3,100)
3 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
To generate a list of numbers with a speci�c increment step, de�ne the step in the 4th argument, 10 in
our case:
=SEQUENCE(5,3,100,10)
The SEQUENCE function is only available with Microsoft 365 subscriptions and Excel 2021. In Excel
2019, Excel 2016 and earlier versions, it does not work since those versions do not support dynamic
arrays.
If the array of sequential numbers is the �nal result, Excel outputs all the numbers automatically in
a so-called spill range. So, be sure you have enough empty cells down and to the right of the cell
where you enter the formula, otherwise a #SPILL error will occur.
The resulting array can be one-dimensional or two-dimensional, depending on how you con�gure
the rows and columns arguments.
examples
Though the basic SEQUENCE formula does not look very exciting, when combined with other
functions, it takes on a whole new level of usefulness.
For example, to create a list of numbers starting at 10 and decreasing by 1, use this formula:
For example, to �ll 5 rows and 3 columns with sequential numbers starting at 100 and incremented by
5 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
To better understand the approach, please have a look at the screenshot below. Here, we input all the
parameters in separate cells (E1:E4) and create 2 sequences with the below formulas. Please pay
attention rows and columns are supplied in di�erent order!
Where B1 is the number of rows, B2 is the number of columns, B3 is the start number and B4 is the
step.
6 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
For example, to create a series of increasing random numbers that spills in as many rows and
columns as speci�ed in B1 and B2, respectively, and start at the integer in B3, the formula goes as
follows:
Depending on whether you want a smaller or bigger step, supply a lower or higher number for the
second argument of RANDBETWEEN.
7 of 8 2/17/2025, 9:30 AM
Firefox https://www.ablebits.com/office-addins-blog/sequence-function-excel-a...
To make a sequence of decreasing random numbers, the step should be negative, so you put the
minus sign before the RANDBETWEEN function:
Note. Because the Excel RANDBETWEEN function is volatile, it will generate new random values
with every change in your worksheet. As the result, your sequence of random numbers will be
continuously changing. To prevent this from happening, you can use Excel's Paste Special > Values
feature to replace formulas with values.
That's how to create sequence in Excel with formulas. I hope the examples were both useful and fun.
Anyway, thank you for reading and hope to see you on our blog next week!
8 of 8 2/17/2025, 9:30 AM