| Syntax |
| =SEQUENCE(rows,[columns],[start],[step]) |
| Purpose / Description |
| A dynamic array formula that returns a sequence of numbers in an array whose dimensions are specified. Allows the user to specify the starting value and increment to the value in the resulting array. Added in Excel 365, this simplifies the task of generating number (including Date and Time values) sequences. |
| Arguments |
| Name |
Type |
Description |
| rows |
number |
A constant, reference or nested expression that specifies the number of rows in the result array. Must be a positive number. |
| [columns] |
number |
An optional constant, reference or nested expression specifying the number of columns in the result array. Defaults to 1 if omitted. Must be a positive number. |
| [start] |
number |
An optional constant, reference or nested expression that specifies the value of the first entry in the returned array. Defaults to 1 if omitted. May be any negative through positive number in the Excel number range limit. |
| [step] |
number |
An optional constant, reference or nested expression that specifies the increment or step value between each value output. May be any negative through positive number in the Excel number range limit. |
| Return Values |
| Type |
Specific Value |
Description |
| array of numbers |
|
Returns an array of numbers that has the given number of rows and columns, with values being filled into the array in a Z pattern, across the rows, row by row. If this is the final result of the formula, the results will spill into the given number of rows and columns. |
| error |
#CALC! |
If either the number of rows or columns is 0. |
| error |
#VALUE! |
If the number of rows or columns is negative. |
| error |
#VALUE! |
If any of the arguments are not a number and cannot be coerced to numbers. |
| error |
#VALUE! |
If the result of adding step to any of the numbers in the array results in a value outside Excel's valid range of numbers. |
| error |
|
Any errors referenced by arguments are returned due to propagation of error values. |
| Notes / Comments / Advice / Warnings |
| Comment: |
This function is extremely useful in generating a series of values, such as a date range, and in intermediate calculations and manipulations of arrays within LET and LAMBDA functions. |
| Examples: |
Open / download sample workbook: SEQUENCE.xlsx |
| |