How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?

How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?

The SEQUENCE function in Excel allows users to generate a sequence of numbers based on specified parameters. By inputting the starting number, increment, and length of the sequence, users can easily create a series of numbers that follow a specific pattern. This can be especially useful for creating numbered lists or filling in data tables. With the SEQUENCE function, users can quickly and accurately generate a sequence of numbers without having to manually type them out. This function is a valuable tool for organizing and analyzing data in Excel.

The SEQUENCE function allows you to generate a list of sequential numbers in an array, such as 1, 2, 3, 4.

In the following example, we created an array that’s 4 rows tall by 5 columns wide with =SEQUENCE(4,5).

SEQUENCE function example with a 4 x 5 array

=SEQUENCE(rows,[columns],[start],[step])

Argument

Description

rows

Required

The number of rows to return

[columns]

Optional

The number of columns to return

[start]

Optional

The first number in the sequence

[step]

Optional

The amount to increment each subsequent value in the array

Notes: 

  • Any missing optional arguments will default to 1. If you omit the rows argument, you must provide at least one other argument.

  • An array can be thought of as a row of values, a column of values, or a combination of rows and columns of values. In the example above, the array for our SEQUENCE formula is range C1:G4.

  • The SEQUENCE function will return an array, which will spill if it’s the final result of a formula. This means that Excel will dynamically create the appropriate sized array range when you press ENTER. If your supporting data is in an Excel table, then the array will automatically resize as you add or remove data from your array range if you’re using structured references. For more details, see this article on spilled array behavior.

  • Excel has limited support for dynamic arrays between workbooks, and this scenario is only supported when both workbooks are open. If you close the source workbook, any linked dynamic array formulas will return a #REF! error when they are refreshed.

Example

If you need to create a quick sample dataset, here’s an example using SEQUENCE with TEXT, DATE, YEAR, and TODAY to create a dynamic list of months for a header row, where the underlying date will always be the current year. Our formula is: =TEXT(DATE(YEAR(TODAY()),SEQUENCE(1,6),1),”mmm”).

Use SEQUENCE with TEXT, DATE, YEAR, and TODAY to create a dynamic list of months for our header row.

Here’s an example of nesting SEQUENCE with INT and RAND to create a 5 row by 6 column array with a random set of increasing integers. Our formula is: =SEQUENCE(5,6,INT(RAND()*100),INT(RAND()*100)).

SEQUENCE example nested with INT and RAND to create a sample data set

In addition, you could use =SEQUENCE(5,1,1001,1000) to create the sequential list of GL Code numbers in the examples.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

Cite this article

stats writer (2024). How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-sequence-function-in-excel-to-create-a-sequence-of-numbers-according-to-specified-parameters/

stats writer. "How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?." PSYCHOLOGICAL SCALES, 1 Jul. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-sequence-function-in-excel-to-create-a-sequence-of-numbers-according-to-specified-parameters/.

stats writer. "How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-sequence-function-in-excel-to-create-a-sequence-of-numbers-according-to-specified-parameters/.

stats writer (2024) 'How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-sequence-function-in-excel-to-create-a-sequence-of-numbers-according-to-specified-parameters/.

[1] stats writer, "How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, July, 2024.

stats writer. How can I use the SEQUENCE function in Excel to create a sequence of numbers according to specified parameters?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
PDF
Scroll to Top