Google Sheets SEQUENCE Function: Step-by-Step Guide
In this article
The SEQUENCE function in Google Sheets generates a list of sequential numbers in a spilled array. To use it, type =SEQUENCE(rows, columns, start, step) into a cell and press Enter; the numbers fill the specified range automatically. For example, =SEQUENCE(5) returns 1 through 5 in a single column, and =SEQUENCE(2,3,10,5) returns two rows and three columns starting at 10 and increasing by 5. You do not need to drag a fill handle or pre-select a range—the formula spills into neighboring cells. This guide walks through the syntax, practical examples, common pitfalls, and fixes so you can use SEQUENCE confidently for numbering rows, building date series, creating grids, and more.
What You'll Need
- A Google account with access to Google Sheets (the function is available in all current versions; no add-ons required).
- A blank or existing spreadsheet where you can enter formulas.
- Basic familiarity with typing formulas and pressing Enter.
Step-by-Step
- Open your spreadsheet. Go to Google Sheets and open a new or existing file. Click the cell where you want the sequence to begin. The formula will spill into adjacent cells, so make sure the area to the right and below is empty to avoid #REF! errors.
- Type the SEQUENCE formula. Start with an equals sign, then SEQUENCE and an opening parenthesis:
=SEQUENCE(. You can type the arguments directly or use the formula suggestion box that appears as you type. - Enter the rows argument. This is the only required argument. It sets how many rows the sequence will occupy. For a vertical list of 10 numbers, type
10. For example:=SEQUENCE(10). - Add optional arguments if needed. After the rows argument, you can add columns, start, and step, separated by commas. The full syntax is
SEQUENCE(rows, columns, start, step). For instance,=SEQUENCE(3,2,100,10)creates a 3-row by 2-column grid starting at 100 and increasing by 10 each step. - Close the parenthesis and press Enter. The formula will calculate and spill the numbers into the surrounding cells. If you see a #REF! error, it means the spill range is blocked—clear the cells to the right or below and try again.
- Adjust the arguments as needed. Click the cell containing the formula and edit the numbers directly in the formula bar. The spilled array updates instantly. To change the orientation from vertical to horizontal, set the rows argument to 1 and the columns argument to the desired length, e.g.,
=SEQUENCE(1,5). - Use SEQUENCE with dates. Because dates are stored as numbers in Sheets, you can generate a date series. For example,
=SEQUENCE(7,1,DATE(2025,1,1),1)returns seven consecutive dates starting January 1, 2025. Format the result as dates via Format > Number > Date. - Combine with other functions. SEQUENCE works well inside functions like SUM, AVERAGE, or INDEX. For example,
=SUM(SEQUENCE(5))adds 1 through 5. You can also use it to create row numbers for lookup formulas or to generate test data.
Common Mistakes
- Forgetting to leave space for the spill. If any cell in the target range already contains data, SEQUENCE returns a #REF! error. Always clear the area first or place the formula where there is room to expand.
- Using a step of zero. A step of 0 produces the same number repeated, which is rarely intended. Use a positive or negative number to control the increment.
- Mixing up rows and columns. The first argument is rows (vertical), the second is columns (horizontal). To create a horizontal list, set rows to 1 and columns to the desired length.
- Assuming SEQUENCE works in older Excel files. SEQUENCE is a Google Sheets function and is not available in Excel unless you use dynamic array formulas in newer versions. If you export to Excel, the formula may not calculate.
- Expecting SEQUENCE to fill downward without spilling. It always returns an array; you cannot force it into a single cell without using functions like ARRAYFORMULA or INDEX to extract a single value.
Tips
- Use SEQUENCE to create numbered lists that update automatically when you add or remove rows—just reference the count with a function like COUNTA.
- Combine SEQUENCE with TEXT to format numbers as text with leading zeros, e.g.,
=TEXT(SEQUENCE(5),"000"). - For a quick horizontal sequence, type
=SEQUENCE(1,10)to get 1 through 10 across columns. - Use a negative step to count down:
=SEQUENCE(5,1,10,-1)returns 10, 9, 8, 7, 6. - If you need a static list, copy the spilled range and paste as values (Ctrl+Shift+V or Cmd+Shift+V) to remove the formula.
Troubleshooting
If SEQUENCE does not work as expected, check these common issues:
- #REF! error: The spill range is blocked. Clear the cells to the right and below the formula cell, or move the formula to an empty area.
- #NAME? error: The function name is misspelled or not recognized. Ensure you typed SEQUENCE correctly and that you are using Google Sheets, not another spreadsheet app.
- #NUM! error: The arguments are invalid, such as a negative number of rows or columns. Rows and columns must be positive integers.
- Formula shows as text: The cell may be formatted as plain text. Change the format to Automatic or Number via Format > Number > Automatic.
- Spill range not updating: If you edit the formula, the array should recalculate. If not, try pressing Ctrl+Shift+F9 (or Cmd+Shift+F9 on Mac) to force a recalculation.
If that did not work, try closing and reopening the spreadsheet, or test the formula in a new blank sheet to rule out conflicts with other data or formatting.
Frequently Asked Questions
What does the SEQUENCE function do in Google Sheets?
SEQUENCE generates a list or grid of sequential numbers based on the arguments you provide. It returns an array that spills into multiple cells, making it useful for numbering, creating date series, and building test data.
Can I use SEQUENCE to create a horizontal list?
Yes. Set the rows argument to 1 and the columns argument to the number of items you want. For example, =SEQUENCE(1,5) returns 1 through 5 across five columns.
How do I make a sequence of dates?
Use the DATE function as the start argument. For example, =SEQUENCE(7,1,DATE(2025,1,1),1) returns seven consecutive dates starting January 1, 2025. Format the cells as dates to display them correctly.
Why am I getting a #REF! error with SEQUENCE?
A #REF! error means the spilled array cannot expand because one or more cells in the target range are not empty. Clear the cells to the right and below the formula, or move the formula to a location with enough empty space.
Can SEQUENCE count backwards?
Yes. Use a negative step value. For example, =SEQUENCE(5,1,10,-1) returns 10, 9, 8, 7, 6.
Is SEQUENCE available in Microsoft Excel?
SEQUENCE is available in Excel 365 and Excel 2021 as a dynamic array function, but it may not work in older versions. In Google Sheets, it is fully supported. If you export a Google Sheet to Excel, check that the function is recognized.