*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 flash with the Auto Fill feature. If you have a more specific task in mind, then use the SEQUENCE function, which is specially designed for this purpose.

## Excel SEQUENCE function

The SEQUENCE function in Excel is used to generate an array of sequential numbers such as 1, 2, 3, etc.

It is a new dynamic array function introduced in Microsoft Excel 365. The result is a dynamic array that spills into the specified number of rows and columns automatically.

The function has the following syntax:

Where:

**Rows** (optional) - the number of rows to fill.

**Columns** (optional) - the number of columns to fill. If omitted, defaults to 1 column.

**Start** (optional) - the starting number in the sequence. If omitted, defaults to 1.

**Step** (optional) - the increment for each subsequent value in the sequence. It can be positive or negative.

- If positive, subsequent values increase, creating an ascending sequence.
- If negative, subsequent values decrease, producing a descending sequence.
- If omitted, the step defaults to 1.

The SEQUENCE function is only supported in Excel for Microsoft 365, Excel 2021, and Excel for the web.

## Basic formula to create a number sequence in Excel

If you are looking to populate a column of rows with sequential numbers starting at 1, you can use the Excel SEQUENCE function in its simplest form:

To put numbers in a **column**:

*n*)

To place numbers in a **row**:

*n*)

Where *n* is the number of elements in the sequence.

For example, to populate a column with 10 incremental numbers, type the below formula in the first cell (A2 in our case) and press the Enter key:

`=SEQUENCE(10)`

The results will spill in the other rows automatically.

To make a horizontal sequence, set the *rows* argument to 1 (or omit it) and define the number of *columns*, 8 in our case:

`=SEQUENCE(1,8)`

If you'd like to fill a **range of cells** with sequential numbers, then define 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 specific number**, say 100, supply that number in the 3^{rd} argument:

`=SEQUENCE(5,3,100)`

To generate a list of numbers with a **specific increment step**, define the step in the 4^{th} argument, 10 in our case:

`=SEQUENCE(5,3,100,10)`

Translated into plain English, our complete formula reads as follows:

### SEQUENCE function - things to remember

To efficiently do a sequence of numbers in Excel, please remember these 4 simple facts:

- 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 final 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 configure the
*rows*and*columns*arguments. - Any optional argument that is not set defaults to 1.

## How to create a number sequence in Excel - formula 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.

### Make a decreasing (descending) sequence in Excel

To generate a descending sequential series, such that each subsequent value is less than the preceding one, supply a **negative** number for the *step* argument.

For example, to create a list of numbers starting at 10 and decreasing by 1, use this formula:

`=SEQUENCE(10, 1, 10, -1)`

### Force a two-dimensional sequence to move vertically top to bottom

When populating a range of cells with sequential numbers, by default, the series always goes horizontally across the first row and then down to the next row, just like reading a book from left to right. To get it to propagate vertically, i.e. top to bottom across the first column and then right to the next column, nest SEQUENCE in the TRANSPOSE function. Please note that TRANSPOSE swaps rows and columns, so you should specify them in the reverse order:

*columns*,

*rows*, start, step))

For example, to fill 5 rows and 3 columns with sequential numbers starting at 100 and incremented by 10, the formula takes this form:

`=TRANSPOSE(SEQUENCE(3, 5, 100, 10))`

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 different order!

Sequence that moves vertically top to bottom (row-wise):

`=TRANSPOSE(SEQUENCE(E2, E1, E3, E4))`

Regular sequence that moves horizontally left to right (column-wise):

`=SEQUENCE(E1, E2, E3, E4)`

### Create a sequence of Roman numbers

Need a Roman number sequence for some task, or just for fun? That's easy! Build a regular SEQUENCE formula and warp it in the ROMAN function. For example:

`=ROMAN(SEQUENCE(B1, B2, B3, B4))`

Where B1 is the number of rows, B2 is the number of columns, B3 is the start number and B4 is the step.

### Generate an increasing or decreasing sequence of random numbers

As you probably know, in new Excel there is a special function for generating random numbers, RANDARRAY, which we discussed a few articles ago. This function can do a lot of useful things, but in our case it cannot help. To generate either an ascending or descending series of random whole numbers, we'll be needing the good old RANDBETWEEN function for the *step* argument of SEQUENCE.

For example, to create a series of **increasing random numbers** that spills in as many rows and columns as specified in B1 and B2, respectively, and start at the integer in B3, the formula goes as follows:

`=SEQUENCE(B1, B2, B3, RANDBETWEEN(1, 10))`

Depending on whether you want a smaller or bigger step, supply a lower or higher number for the second argument of RANDBETWEEN.

To make a sequence of **decreasing random numbers**, the *step* should be negative, so you put the minus sign before the RANDBETWEEN function:

`=SEQUENCE(B1, B2, B3, -RANDBETWEEN(1, 10))`

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.

## Excel SEQUENCE function missing

Like any other dynamic array function, SEQUENCE is only available in Excel for Microsoft 365 and Excel 2021 that support dynamic arrays. You won't find it in pre-dynamic Excel 2019, Excel 2016, and lower.

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!

## Practice workbook for download

Excel SEQUENCE formula examples (.xlsx file)

## 383 comments

00-00-98

00-00-99

00-01-00

can i use sequence in this?

Hi! Create a sequence of numbers as described in the article above. Using the TEXT function, write these numbers as text with six digits with leading zeros. Using the REPLACE function, insert "-" in the text.

=REPLACE(REPLACE(TEXT(SEQUENCE(10,1,98,1),"000000"),3,0,"-"),6,0,"-")

Hello

is there a formula to create numbers in cells for instance put 1 in column A and then in Column B it would put 1-2, then skip a number and put 3-4,6-7,9-10,12-13. trying to set up for custom print pages. and another code to skip 2 pages for instance 1-2,5-6,9-10,13-14,17-18. but would be put in column A 1 and in cell A2 put a 2 there and it would go in sequence like that.

Thank you

Kenny

Hi! Please re-check the article above since it covers your case. Use the SEQUENCE function to create a sequence of numbers. For example:

=SEQUENCE(10,1,1,4)

Hello sir plz solve this problem in excel formula

As a like number one coulum and wants to be A 4789 second number 792

Etc every cells drag the formula but automatic every number combine .

A=4

A=7

A 8

A 9

B 7

B 9

B2

C 6

C3

C9

C2

E 7

E 8

G 1

G 4

To extract each symbol from the text into a separate cell, you can use the MID function. For example:

=MID(A1,ROW(A1:A20),1)

I hope it’ll be helpful. If this is not what you wanted, please describe the problem in more detail.

Hi!

Looking for a formula for a sequence (seems basic but somehow have not been able to figure it out):

24-1

24-2

24-3

The "24" as in the year, so for next years it would need to be 25, and numbers always start at 1 and could go anywhere from 80 to 150 to end (used to number closed files).

Any guidance is greatly appreciated.

Hi! To repeat 100 times the number 24 and then 100 times the number 25, use this formula:

=CEILING(SEQUENCE(200,1,1,1)/100,1)+23

Combine sequences of numbers and text using the CONCATENATE function. For example:

=CONCATENATE(CEILING(SEQUENCE(200,1,1,1)/100,1)+23,"-",SEQUENCE(200,1,1,1))

Thank you so much for your guidance. After trying your formulas and getting the #SPILL! message, I realized that it wasn't going to work on an Excel table, and had to convert it to range (it was the only way the formulas would work, I just don't understand why?).

Hi! This article contains useful information about your issue: #SPILL! error in Excel table.

Hi,

I'm after some help. I want to create a project reference number in excel The first will read GBP1000M-24 This will be GBP1000 03/24, the next one would read GBP100103/24 or to could be GBP100104/24 and so on....

Many thanks

Hi! Your 4 examples are not a sequence of numbers. If you see a pattern in them, describe it. I suggest you study the above article and comments. You will find many examples. Or describe your problem in detail.

This would be really usual if you could spill into a different column. So if you had a list of 60 names in column B and you wanted to do those in three sets of 20, yould need the spill area to be Column A (Name in B), Column C (Name in D) and Column E (Name in E).

Sorry, I have no idea exactly what the task is. To understand what you want to do, give an example of the source data and the expected result.

Hi Alexander,

I'm trying to implement a sequence in a set of (same sized) merged cells.

For this i'm getting a #spill! error.

Is there any way of implementing a sequence function in a set of merged cells?

Thanks in advance!

Hi! Your problem is described here: Spill range contains merged cells.

Hi I need to make a number sequence for 500 items.

1000-7300

1001-7300

1002-7300

is there a way to do this in excel?

Hi! There are many solutions to your issue in the comments of this article. Create a sequence of numbers and combine with a text string. For example:

=SEQUENCE(10,1,1000,1)&"-7300"

Hi, how do I create a sequence just like in my sample

50-34386-1582 S. 2000

Hi! I don't see any sequence in your example. If it is there, please describe it.