SEQUENCE Function, How it works:
In Google Sheets, the SEQUENCE() function is used to generate an array of sequential numbers. It is a dynamic tool used to generate a sequence of numbers, such as a list of serial numbers or any series of consecutive values. This function particularly useful for creating rows or columns of numbers without typing manually to them.
Returns an array of sequential numbers, such as 1, 2, 3, 4. or other series as you data provide in the formula.
Syntax : SEQUENCE(rows, columns, start, step)
First Argument, rows
:
- rows: The number of rows you want in your sequence. It is mostly used to generate a sequence of numbers, such as a list of auto-fill serial numbers or any series of consecutive values, very useful for creating rows or columns of numbers without manually entering them.
e.g. =SEQUENCE(10) – first image shown the results (below).
e.g. =SEQUENCE(10, 2), here in the formula, if you specify the numbers of columns, the result will be displayed across 2 columns, with numbers filling both columns according to your preference. – the second image shown the output, where the sequence divided between 2 columns (below) as 1,3,5…..19 in column 1 and 2,4,6……20 in column 2.
Second Argument, columns (optional)
:
columns (optional) – the number of columns to fill with the sequence. Defaults to 1 if omitted. e.g. =SEQUENCE(6, 2), the result will be shown in two vertical sequence of 6 numbers, from 1 to 11 (even numbers) and 2 to 12 (odd numbers), in two columns where you put the formula. as shown below:
Third Argument, start (optional)
:
start (optional) – the starting number of the sequence. Default to 1 if omitted.
=SEQUENCE(6, 1, 11)
- In the SEQUENCE function (1st argument) 6, presents that how much numbers of row.
- The (2n argument) 1, presents as how much column data be fill or divided.
- The (3rd argument) 11, presents that the value of the serial numbers is starts from 11.
So, the SEQUENCE function in this case will create a vertical list of 6 numbers starting from 11, arranged in one column.
Forth Argument, step (optional)
:
- step (optional) – the step argument in the SEQUENCE formula define the increment between each number in the sequence. By default, the step is 1, meaning each number increases by 1. However, if you provide a step argument, the sequence will increase (or decrease, if negative) by that specified value.
- Here, multiplication tables is the best example for fourth argument of SQUENCE function, step(optional), as image (Right).
Review arguments
:
- rows – Specifies the number of rows according to your sequence,
e.g. =SEQUENCE(10),
the result will be generate a vertical sequence of numbers from 1 to 10 (similar to what you see in column 1 of the table above), in single column where you put the formula. - If you want to start from a specific number, like the sequence shown in column 2 (as shown above), use the third argument in formula e.g.
=SEQUENCE(9, 1, 8, 1),
result output will be a vertical sequence starting at 8 and ending at 16. - To create a sequence with a custom step value, use the fourth argument. For instance, (shown above)
e.g. =SEQUENCE(8, 1, 1, 3),
will generate a vertical sequence starting at 1 and increasing by 3, resulting in 1, 4, 7, and so on, with a gap of 3 between each number.
Custom Number Sequences Using SEQUENCE in Google Sheets
To generate a number chart you just need the correct formula, using the SEQUENCE function in Google Sheets only with two arguments and the numbers chart is on your desktop.
Horizontal Series:
=SEQUENCE(10,10)
This formula creates a 10 X 10 grid of numbers in a horizontal format, filling cells from left to right. e.g. 1,2,3,4,5,6…..10 in first row and second row 11,12,13,14,……20 as so on.
Vertical Series:
=TRANSPOSE(SEQUENCE(10,10)
)
This formula generates the same 10 X 10 grid of numbers but arrange them vertically, filling cells from top to bottom by using the TRANSPOSE function..
Both formulas effectively create a series of numbers in the desired format, allowing for easy data representation. The below image based on the vertical series or TRANSPOSE function, filling cells from up to down. e.g. 1,2,3,4,5,6…..10 in first column and second column 11,12,13,14,……20 as so on.
How to Create Multiplication Tables in Google Sheets with SEQUENCE
If you want to generate multiplication table charts using the SEQUENCE function in Google Sheets, it simplifies the process. By entering the correct formula, you can create tables for any desired number. For example, to create a multiplication table for 4, you can use the following formula:
=SEQUENCE(10,1,4,4)
In this formula, the last two arguments (4, 4) are crucial. They determine the starting number and step size. For a multiplication table of 5, simply change the last two arguments to (5,5), and the output will generate the table for 5. For table of 6, (6,6) and so on, this approach makes it easy to create dynamic tables for any number.
In Google Sheets, the SEQUENCE function offers flexibility in generating numbers with custom starting values and step intervals. However, it doesn’t automatically update when you add or change data in your sheet – you have to adjust the range or values manually. To automatically generate serial numbers that update dynamically, it’s recommended to combine SEQUENCE with the COUNTA function. This ensures your serial numbers adjust based on the number of non-empty entries in a specified range.
Did you like this article?
If you found this post helpful, feel free to share it with your network using the social media buttons on X or via email located on the left below.
YOU MUST KNOW?
How to Search Data by Keywords in Google Sheets Using FILTER, ISNUMBER and SEARCH
If you have any questions or need assistance regarding the SEQUENCE functions in Google Sheets, feel free to leave your query in the comment section. The CountLen team is dedicated to providing you with the best solutions in a timely manner, generally responding promptly once a query is raised, ensuring that all concerns are addressed efficiently.