SheetSense

Generate number lists with SEQUENCE

SEQUENCE creates a series of numbers in one formula, with a chosen number of rows, columns, start value and step.

fx
=SEQUENCE(5,1,100,10)

The sheet: You need a column of IDs that starts at 100 and goes up by 10: 100, 110, 120, 130, 140.

How it works, step by step

  1. 015 is the number of rows.
  2. 021 is the number of columns.
  3. 03100 is the starting number.
  4. 0410 is the step between numbers. The values spill down from the formula cell.

The same logic in four tools

Excel
=SEQUENCE(5,1,100,10)
Google Sheets
=SEQUENCE(5,1,100,10)
SQL
SELECT generate_series(100, 140, 10) AS id;  -- PostgreSQL
Python (pandas)
import numpy as np

ids = np.arange(100, 150, 10)  # 100 to 140

Mistakes that break it

  • !Excel requires Microsoft 365 or Excel 2021. Older versions have no SEQUENCE.
  • !Any value in the spill area causes #SPILL!.
  • !np.arange excludes its end value, while SQL generate_series includes it.

Common questions

How do I number rows to match another column?
Use =SEQUENCE(COUNTA(A2:A100)) to get one number for each filled row.
Can I make a grid?
Yes. SEQUENCE(3,4) fills 3 rows by 4 columns, counting across each row.

Got a version of this with your own ranges?

Paste it into the free translator and get the same breakdown for your exact formula. To run it against a real file, upload the CSV and describe the formula you need in a sentence.