The SEQUENCE function is a Math & Trigonometry formula that generates a list of sequential numbers in the form of an array or range. In this guide, we’re going to show you how to use the SEQUENCE function and also go over some tips and error handling methods.
Supported versions
- At the time of writing this article, Microsoft announced that this formula is currently only available to a number of select insider users. When it's ready, the feature is planned for release for Office 365 users.
Syntax
Arguments
rows |
The number of rows to be returned. |
[columns] |
Optional. The number of columns to be returned. The default value is 1. |
[start] |
Optional. Starting value. The default value is 1. |
[step] |
Optional. The increment of each step between values. The default value is 1. |
Examples
Row/column only list
Populate only columns: =SEQUENCE(1,10)
Set rows to 1 and enter a number for the [columns] argument to populate only columns.
Row & column list
Combination with other functions
Tips
- Using a dynamic array function like SEQUENCE with another function makes the formula return a spill. For example, you can use the following formula to generate a list of months. =DATE(2019,SEQUENCE(12),1)
- The SORT function shows an example that lists the top 3 results from a table.
Issues
#SPILL!
If there isn't enough space for adding the results below the formula, you will see a #SPILL! error. Excel marks the target range with dashed lines. Clear the contents of the cells in this range, and Excel will automatically update the results.
#VALUE!
If any of the arguments is not a numeric value, you will get a #VALUE! error.