Skip to content

icon picker

Formula: Sequence()
Category: Lists (Arrays)
Pulls a list of numbers between a starting and ending point that you provide
It’s kind of like saying...
Hey Coda, I’m going to provide you with two numbers: a starting and ending number. I want you to provide me with a list of the numbers between these two. Also, If I want you to count up by a different number than 1, can you do so?

Sequence() takes three parameters. Two are required and one is optional.
Sequence(Start, End, By)
The number on the list to start from
Sequence(Start, End, By)
The number on the list to end on
Sequence(Start, End, By)
The number your list will count up by

Sequence() allows you create lists of sequential numbers or dates. As mentioned above, the formula defaults to counting up by 1; however, you have the option to count up by any number you wish by setting the By parameter to that number. Try it out below:
Count to:
Count by:
List of Generated Numbers:
The only difference between these list variations is the number hey count up by. Neat, right?!

Where and How To Use This

Though Sequence() can seem slightly useless at first glance, this formula is extremely versatile, and deserves a spot in your top 10 formulas! One important use is in back-end functions or automations. Let’s look at a real-life use case to further illustrate how to use this formula.

Creating a list of dates

I often create a hidden page called “Date Controls” in my docs. It holds canvas-based formulas containing the relative dates of the current week, previous week, current month, and previous month. As an example, here is a canvas based formula named ThisWeek.
Now that I have a list of every date in a week that is named ThisWeek , I can create easy filters or buttons to quickly filter a table to contain only dates from ThisWeek. View my to see these buttons in action. Each button references a list of dates created by Sequence() to quickly filter a table.

Quickly adding rows to a table

Often times you might want to quickly add a mass amount of rows to a table. Use cases include:
Create a table with 100 rows or 1000 rows to stress test a document.
Create a table with 1 row for every day in the year.
Here's and example table with one rows in it. Press each button to see how it automatically adds rows all possible because of sequence (Then click into the button to see how the formulas were written)
Add 25 Rows
Add All Dates from this Month
Reset Table
Quickly Add Rows

Practice: Demonstrate your understanding of this formula’s parameters
Challenge: Learn to combine Sequence() with other formulas
Challenge: Build a rich dashboard of information that gives insights into your data and patterns within tables

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.