SEQUENCE
REEKS in Dutch Excel
Builds a block of consecutive numbers with a start value and a step, which spills into as many rows and columns as you ask for.
Last updated: 13 October 2026
| Row | A | B | C | D |
|---|---|---|---|---|
| 1 | Customer | Balance | No. | |
| 2 | Van Dijk Transport BV | €48,250.00€ 48.250,00 | 11=SEQUENCE(5)=SEQUENCE(5) | |
| 3 | Hendriks Metaal BV | €31,900.00€ 31.900,00 | 22 | |
| 4 | Smits Bouw BV | €22,475.00€ 22.475,00 | 33 | |
| 5 | Mulder Horeca BV | €15,120.00€ 15.120,00 | 44 | |
| 6 | Kaya Design BV | €9,860.00€ 9.860,00 | 55 |
Swipe sideways to see all columns
=SEQUENCE(5)
=SEQUENCE(5)
What SEQUENCE does and when to use it
What it does: it creates a block of numbers from one formula, for example line numbers 1 to 25 or the month offsets 0 to 11.
When to use it: when a formula needs a list of numbers to feed to another function, such as EDATE for a run of months or INDEX for every third line, or when you number a list that grows or shrinks. It replaces dragging a fill handle. For one number or a fixed header, typing the value is clearer.
Two main gains:
- One formula, whole block: you set height, width, first number and step, and the spill fills the cells. No fill handle to drag.
- Follows your data: make
rowsdepend on the list, for example with COUNTA, and the numbering stays right when the list grows.
How Excel evaluates it
Excel reads rows and columns and reserves a block of that size, starting at the formula cell. It puts start in the top left cell. It then fills the block row by row, from left to right, and after each cell adds step: in a block of 2 rows and 3 columns with defaults, the first row holds 1, 2, 3 and the second row 4, 5, 6.
Leave out columns, start or step and Excel uses 1 for each. If a cell in the block is already occupied, the result is #SPILL!.
Watch out: In Excel 2019 or earlier SEQUENCE shows #NAME?.
Mental model
A fill handle that you control by numbers: you say how far to drag, in which directions, where to start and how big each step is.
SEQUENCE(rows,[columns], [start], [step])
SEQUENCE(rows;[columns]; [start]; [step])
| Argument | Type | Meaning | Default |
|---|---|---|---|
rows | Required | How many rows the block has. | |
columns | Optional | How many columns; default 1. | 1 |
start | Optional | The first number; default 1. | 1 |
step | Optional | The increment between numbers; default 1. | 1 |
Return value:A block of numbers, rows tall and columns wide, filled row by row
Formulas use commas (,) between arguments, as in English Excel. Formulas use semicolons (;) between arguments, as in Dutch Excel. Formulas use commas (,) between arguments, as in English Excel; Dutch Excel uses semicolons (;).
Worked examples
Beginner
Number the lines of a confirmation list
At Veldhuis Installatie BV you have picked five customers from the receivables list for balance confirmations. Your workpaper needs a reference number per line, so letters and replies can be tied back to the list. You want the numbers to come from a formula, not from typing.
| Row | A | B | C | D | E |
|---|---|---|---|---|---|
| 1 | Customer | Balance | No. | ||
| 2 | Van Dijk Transport BV | €48,250.00€ 48.250,00 | 11=SEQUENCE(5)=SEQUENCE(5) | ||
| 3 | Hendriks Metaal BV | €31,900.00€ 31.900,00 | 22 | ||
| 4 | Smits Bouw BV | €22,475.00€ 22.475,00 | 33 | ||
| 5 | Mulder Horeca BV | €15,120.00€ 15.120,00 | 44 | ||
| 6 | Kaya Design BV | €9,860.00€ 9.860,00 | 55 | ||
| 7 |
Swipe sideways to see all columns
Formula in D2
=SEQUENCE(5)
=SEQUENCE(5)
Result: 1 / 2 / 3 / 4 / 51 / 2 / 3 / 4 / 5
Step by step
- The formula has one argument: rows is 5. The arguments columns, start and step are left out, so each is 1.
- Excel reserves a block 5 rows tall and 1 column wide, starting at
D2: the cellsD2toD6. - The top cell gets start, which is 1. Each next cell adds step, which is 1: 1, then 1+1=2, then 3, 4 and 5.
- The numbers 1 to 5 spill down
D2:D6, next to the five customers in rows 2 to 6: 1 beside Van Dijk Transport BV (48,250.0048.250,00) and 5 beside Kaya Design BV (9,860.009.860,00). - Change the 5 to 6 and the block grows to
D2:D7, with a 6 beside an empty row. The formula follows its argument, not the list, so the number must match the list.
Watch out: If anything is typed in D3:D6, the formula shows #SPILL! instead of the numbers. Keep the cells below the formula empty.
More on this example: why it works, 1 more pitfall, 2 variations
Why it works
With only rows given, SEQUENCE uses its defaults, a start of 1 and a step of 1, which is exactly what a line number needs. The result is a live block: one formula in D2 replaces five typed numbers.
More to watch out for
- The numbers are not tied to the customers. If you sort the list in
A2:B6, the numbers stay 1 to 5 in the same cells and no longer follow the same customer.
Variations
=SEQUENCE(ROWS(A2:A6))
=SEQUENCE(ROWS(A2:A6))
Take the count from the list instead of typing 5, so the numbering adjusts to the range you point at.
=SEQUENCE(1,5)
=SEQUENCE(1;5)
The same five numbers across a row, for column headers.
Intermediate
Positions for a systematic sample of invoices
You test eight purchase invoices of Veldhuis Installatie BV with a systematic sample: a fixed interval after a first position. You type the first position and the interval in F1 and F2, and want the three positions to appear, so you can pick those lines from the list. The positions must stay within the 8 lines of the list.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Invoice | Amount | First position | 22 | |||
| 2 | 25-2001 | €1,210.00€ 1.210,00 | Interval | 33 | |||
| 3 | 25-2002 | €3,025.00€ 3.025,00 | 22=SEQUENCE(3, 1, F1, F2)=SEQUENCE(3; 1; F1; F2) | ||||
| 4 | 25-2003 | €8,470.00€ 8.470,00 | 55 | ||||
| 5 | 25-2004 | €605.00€ 605,00 | 88 | ||||
| 6 | 25-2005 | €12,100.00€ 12.100,00 | |||||
| 7 | 25-2006 | €2,420.00€ 2.420,00 | |||||
| 8 | 25-2007 | €6,050.00€ 6.050,00 | |||||
| 9 | 25-2008 | €15,125.00€ 15.125,00 | |||||
| 10 |
Swipe sideways to see all columns
Formula in E3
=SEQUENCE(3,1, F1, F2)
=SEQUENCE(3;1; F1; F2)
Result: 2 / 5 / 82 / 5 / 8
Step by step
F1holds 2 andF2holds 3. So rows is 3, columns is 1, start is 2 and step is 3.- Excel reserves a block of 3 rows and 1 column from
E3down toE5. - The first cell gets start: 2. The second adds the step: 2+3=5. The third adds it again: 5+3=8.
- The positions count within the list, not the sheet rows. Position 2 is invoice
25-2002(3,025.003.025,00), position 5 is25-2005(12,100.0012.100,00) and position 8 is25-2008(15,125.0015.125,00), which sit in sheet rows 3, 6 and 9. - Change
F2to 4 and the positions become 2, 6 and 2+4+4=10. Position 10 does not exist in a list of 8 lines, so the sample would not fit.
Watch out: Nothing checks that the last position fits the list. Start 2, step 3 and 4 items would end at 11 in a list of 8 lines. Check that start + (n-1) × step is at most the number of lines.
More on this example: why it works, 1 more pitfall, 2 variations
Why it works
start and step turn the counter into an arithmetic series: position n is start + (n-1) × step. That is exactly the rule of a systematic sample, and because both values sit in cells, you change the sample by retyping two numbers.
More to watch out for
- A decimal in
F1orF2, such as 2.5, gives decimal positions that INDEX cuts off to whole numbers, so the lines you pick are not the ones the sample rule describes.
Variations
=INDEX(A2:A9,SEQUENCE(3, 1, F1, F2))
=INDEX(A2:A9;SEQUENCE(3; 1; F1; F2))
Go one step further and return the invoice numbers themselves: 25-2002, 25-2005 and 25-2008.
=SEQUENCE(3,1, 8, -3)
=SEQUENCE(3;1; 8; -3)
Count down from the last line with a negative step: 8, 5, 2.
Advanced
Revenue per month for a cut-off table
For the revenue analysis of Molenaar Bouw BV you have the postings on account 8000 for the first months of 2025. You want one total per month for January to April, without a helper column and without typing month boundaries.
The first day of the period sits in F1. A posting from May is in the list too, and should not be counted.
| Row | A | B | C | D | E | F | G |
|---|---|---|---|---|---|---|---|
| 1 | Date | Amount | Period start | 1 Jan 2025 | |||
| 2 | 14 Jan 2025 | €12,000.00€ 12.000,00 | |||||
| 3 | 29 Jan 2025 | €8,500.00€ 8.500,00 | €20,500.00€ 20.500,00=SUMIFS(B2:B9, A2:A9, ">="&EDATE(F1, SEQUENCE(4, 1, 0)), A2:A9, "<"&EDATE(F1, SEQUENCE(4, 1, 1)))=SUMIFS(B2:B9; A2:A9; ">="&EDATE(F1; SEQUENCE(4; 1; 0)); A2:A9; "<"&EDATE(F1; SEQUENCE(4; 1; 1))) | ||||
| 4 | 10 Feb 2025 | €15,250.00€ 15.250,00 | €25,000.00€ 25.000,00 | ||||
| 5 | 27 Feb 2025 | €9,750.00€ 9.750,00 | €17,400.00€ 17.400,00 | ||||
| 6 | 5 Mar 2025 | €11,000.00€ 11.000,00 | €7,300.00€ 7.300,00 | ||||
| 7 | 31 Mar 2025 | €6,400.00€ 6.400,00 | |||||
| 8 | 2 Apr 2025 | €7,300.00€ 7.300,00 | |||||
| 9 | 2 May 2025 | €5,150.00€ 5.150,00 | |||||
| 10 |
Swipe sideways to see all columns
Formula in E3
=SUMIFS(B2:B9,A2:A9, ">="&EDATE(F1, SEQUENCE(4, 1, 0)), A2:A9, "<"&EDATE(F1, SEQUENCE(4, 1, 1)))
=SUMIFS(B2:B9;A2:A9; ">="&EDATE(F1; SEQUENCE(4; 1; 0)); A2:A9; "<"&EDATE(F1; SEQUENCE(4; 1; 1)))
Result: €20,500.00 / €25,000.00 / €17,400.00 / €7,300.00€ 20.500,00 / € 25.000,00 / € 17.400,00 / € 7.300,00
Step by step
F1is 1 January 2025, serial number 45658. The two SEQUENCE calls come first. SEQUENCE(4, 1, 0) gives 0, 1, 2, 3 and SEQUENCE(4, 1, 1) gives 1, 2, 3, 4.- EDATE moves
F1by each of those months. With 0, 1, 2, 3 it returns the first of January, February, March and April: 45658, 45689, 45717, 45748. With 1, 2, 3, 4 it returns the first of the next month each time: 45689, 45717, 45748, 45778 (1 May). - The
&joins the operator to each number, so the criteria are ">=45658", ">=45689", ">=45717", ">=45748" for the first test and "<45689", "<45717", "<45748", "<45778" for the second. Each month is a pair: on or after its first day and before the first day of the next month. SUMIFS runs once per pair:
- January: 14 and 29 January, 12,00012.000 + 8,5008.500 = 20,50020.500
- February: 15,25015.250 + 9,7509.750 = 25,00025.000
- March: 11,00011.000 + 6,4006.400 = 17,40017.400, and 31 March counts because it is before 1 April
- April: 7,3007.300
- The four totals spill down
E3:E6. The posting of 2 May (5,1505.150) falls in no pair: 20,50020.500 + 25,00025.000 + 17,40017.400 + 7,3007.300 = 70,20070.200, whileB2:B9adds up to 75,35075.350. The difference of 5,1505.150 is exactly that posting.
Watch out: The count 4 is typed twice. If you change one SEQUENCE to 5 and forget the other, the two criteria arrays have different sizes and the result is wrong or an error. Take the count from one cell instead.
More on this example: why it works, 1 more pitfall, 2 variations
Why it works
SEQUENCE supplies the month offsets, EDATE turns each offset into a date, and SUMIFS accepts an array as criteria and returns one answer per element. The sum range and both criteria ranges stay fixed, while the criteria change per row of the spill, so a table that used to need a helper column becomes one formula.
More to watch out for
- Silent error: with SEQUENCE(4, ...) the May posting is dropped without any message, and the table is 5,1505.150 short of the ledger. Always compare the sum of the table with the total of the source.
Variations
=EDATE(F1,SEQUENCE(4, 1, 0))
=EDATE(F1;SEQUENCE(4; 1; 0))
The month column itself, to place beside the totals: 1 Jan, 1 Feb, 1 Mar and 1 Apr 2025. Format the cells as dates.
=SUMIFS(B2:B9,A2:A9, ">="&F1, A2:A9, "<"&EDATE(F1, 4))
=SUMIFS(B2:B9;A2:A9; ">="&F1; A2:A9; "<"&EDATE(F1; 4))
One total for the whole period January to April (70,20070.200), as a quick check on the monthly figures.
Master
Purchases per month in a quarter grid, reconciled
Hendriks Metaal BV has a broken fiscal year from 1 July 2025 to 30 June 2026. For your analytical review you want purchases per month in a grid of four quarters (rows) by three months (columns). The grid must name its steps for the reviewer and must refuse to show numbers that do not add up to the ledger, for example when a posting falls outside the fiscal year.
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | Entry | Date | Amount | Fiscal year start | 1 Jul 2025 | |||
| 2 | 25-3101 | 8 Jul 2025 | €4,200.00€ 4.200,00 | |||||
| 3 | 25-3102 | 19 Aug 2025 | €6,800.00€ 6.800,00 | €4,200.00€ 4.200,00=LET( fyStart, F1, offsets, SEQUENCE(4, 3, 0), monthStart, EDATE(fyStart, offsets), nextMonth, EDATE(fyStart, offsets + 1), totals, SUMIFS(C2:C9, B2:B9, ">="&monthStart, B2:B9, "<"&nextMonth), IF(SUM(totals) = SUM(C2:C9), totals, "Postings outside the fiscal year") )=LET( fyStart; F1; offsets; SEQUENCE(4; 3; 0); monthStart; EDATE(fyStart; offsets); nextMonth; EDATE(fyStart; offsets + 1); totals; SUMIFS(C2:C9; B2:B9; ">="&monthStart; B2:B9; "<"&nextMonth); IF(SUM(totals) = SUM(C2:C9); totals; "Postings outside the fiscal year") ) | €8,150.00€ 8.150,00 | €0.00€ 0,00 | ||
| 4 | 25-3103 | 27 Aug 2025 | €1,350.00€ 1.350,00 | €9,100.00€ 9.100,00 | €0.00€ 0,00 | €2,750.00€ 2.750,00 | ||
| 5 | 25-3104 | 14 Oct 2025 | €9,100.00€ 9.100,00 | €5,600.00€ 5.600,00 | €0.00€ 0,00 | €0.00€ 0,00 | ||
| 6 | 25-3105 | 30 Dec 2025 | €2,750.00€ 2.750,00 | €3,900.00€ 3.900,00 | €0.00€ 0,00 | €8,250.00€ 8.250,00 | ||
| 7 | 26-3106 | 12 Jan 2026 | €5,600.00€ 5.600,00 | |||||
| 8 | 26-3107 | 7 Apr 2026 | €3,900.00€ 3.900,00 | |||||
| 9 | 26-3108 | 30 Jun 2026 | €8,250.00€ 8.250,00 | |||||
| 10 |
Swipe sideways to see all columns
Formula in E3
=LET( fyStart,F1, offsets, SEQUENCE(4, 3, 0), monthStart, EDATE(fyStart, offsets), nextMonth, EDATE(fyStart, offsets + 1), totals, SUMIFS(C2:C9, B2:B9, ">="&monthStart, B2:B9, "<"&nextMonth), IF(SUM(totals) = SUM(C2:C9), totals, "Postings outside the fiscal year") )
=LET( fyStart;F1; offsets; SEQUENCE(4; 3; 0); monthStart; EDATE(fyStart; offsets); nextMonth; EDATE(fyStart; offsets + 1); totals; SUMIFS(C2:C9; B2:B9; ">="&monthStart; B2:B9; "<"&nextMonth); IF(SUM(totals) = SUM(C2:C9); totals; "Postings outside the fiscal year") )
Result: €4,200.00 | €8,150.00 | €0.00 / €9,100.00 | €0.00 | €2,750.00 / €5,600.00 | €0.00 | €0.00 / €3,900.00 | €0.00 | €8,250.00€ 4.200,00 | € 8.150,00 | € 0,00 / € 9.100,00 | € 0,00 | € 2.750,00 / € 5.600,00 | € 0,00 | € 0,00 / € 3.900,00 | € 0,00 | € 8.250,00
Step by step
- LET stores fyStart as
F1: 1 July 2025, serial 45839. Nothing is shown yet. - offsets is SEQUENCE(4, 3, 0): 4 rows by 3 columns, start 0, step 1, filled row by row: 0, 1, 2 then 3, 4, 5 then 6, 7, 8 then 9, 10, 11. Each row is one quarter, each column a month of that quarter.
- monthStart is EDATE(fyStart, offsets): the first of July, August, September in row 1, then October to December, January to March, and April to June. nextMonth is the same shifted by one month, so it ends on 1 July 2026. Both are 4 by 3 grids of dates.
totals is SUMIFS over each cell of the grid: postings on or after monthStart and before nextMonth. Per quarter row:
- July to September: July 4,2004.200, August 6,8006.800 + 1,3501.350 = 8,1508.150, September none, 0
- October to December: October 9,1009.100, November 0, December 2,7502.750
- January to March: January 5,6005.600, February and March 0
- April to June: April 3,9003.900, May 0, June 8,2508.250, because 30 June is before 1 July 2026
- The last argument is the result. SUM(totals) is 4,2004.200 + 8,1508.150 + 9,1009.100 + 2,7502.750 + 5,6005.600 + 3,9003.900 + 8,2508.250 = 41,95041.950, and SUM(C2:C9) is also 41,95041.950. They are equal, so IF returns totals.
- The grid spills over
E3:G6. Move one date to 2 July 2026 and that amount falls outside every month: the sums differ andE3shows Postings outside the fiscal year instead of a grid that looks complete.
Watch out: The mirror-image mistake is SEQUENCE(3, 4, 0). It still covers twelve months and the reconciliation still passes, but the grid now has 3 rows of 4 months, so rows are no longer quarters and a reader of the headers is misled. Rows come first: 4 quarters, then 3 months.
More on this example: why it works, 2 more pitfalls, 1 variation
Why it works
One SEQUENCE call carries both dimensions, so the month offsets, the month starts, the next month starts and the totals all keep the same 4 by 3 shape, and the grid layout needs no extra formula. The reconciliation at the end ties the grid to the source, so a posting that falls outside the year cannot disappear silently.
Do not use this when:
- you only need one list of months (a plain SEQUENCE(12) is clearer)
- the file must open in Excel 2019 or earlier
- the client will explore the data by quarter and month: a PivotTable with the dates grouped by months and quarters gives the same figures without a formula and reacts to new data on refresh
More to watch out for
- To debug, replace the last line with one of the names, for example monthStart, and the formula shows that step as a grid of dates. Format the cells as dates, or you see serial numbers.
- The test SUM(totals) = SUM(C2:C9) can hide two errors that cancel each other out, such as a missing posting and a doubled one of the same amount. For a high-risk account, add a count of postings as well.
Variations
=LET( months,EDATE(F1, SEQUENCE(4, 3, 0)), SUMIFS(C2:C9, B2:B9, ">="&months, B2:B9, "<"&EDATE(months, 1)) )
=LET( months;EDATE(F1; SEQUENCE(4; 3; 0)); SUMIFS(C2:C9; B2:B9; ">="&months; B2:B9; "<"&EDATE(months; 1)) )
The same grid with two names and no reconciliation: shorter, but a posting outside the year disappears without any message.
Common mistakes
| Symptom | Cause | Fix |
|---|---|---|
| Block the wrong way round | You ask for SEQUENCE(3, 4) but wanted 4 rows and 3 columns, and the block is the wrong way round. | The first argument is always the height. Rows come first, then columns, the same order as in INDEX. |
| Numbers such as 45658, not dates | A list of dates built with SEQUENCE shows numbers such as 45658 instead of dates. | Dates are serial numbers underneath. Format the spill range as a date, or let a date function such as EDATE produce the values. |
| List wrong when the source grows | The count is fixed in the formula, SEQUENCE(12), and the list silently stops being right when the source has 13 lines. | Take the count from the data, for example SEQUENCE(ROWS(A2:A14)), or reconcile the result with a total, as the Master example does. |
| #SPILL! although the formula is right | The result is #SPILL! even though the formula is right. | Something sits in the cells the block needs. Click the error, choose Select Obstructing Cells, and clear them. |
Used in combinations
- Split a pasted list into a clean columnSplit a list of invoice numbers pasted into one cell on the commas, strip the stray spaces with TRIM and stack the pieces into one column with TOCOL, ready for matching.Excel 2024 or later (This combination needs Excel 2024 or later)
- The five largest manual entries with TAKE, SORT and FILTERList the five largest manual (MEM) journal lines for journal entry testing: FILTER keeps the MEM lines, SORT puts the largest amount first and TAKE keeps the first five rows.Excel 2024 or later (This combination needs Excel 2024 or later)
- Gap test on invoice numbers with FILTER, SEQUENCE and XMATCHFind the missing numbers in a series of sales invoices: SEQUENCE builds every number from the lowest to the highest, XMATCH looks each one up in the ledger, ISNA marks the misses and FILTER lists them, with a message when there are no gaps.Excel 2021 or later (This combination needs Excel 2021 or later)
- Revenue per month for twelve months in one formulaTotal revenue for each of twelve months with one SUMIFS: SEQUENCE counts the months, EDATE turns each count into the first day of a month, and those dates become the criteria.Excel 2021 or later (This combination needs Excel 2021 or later)
- Systematic sample of invoices with a fixed startSelect every k-th invoice from a population: the interval comes from ROUNDDOWN and ROWS, SEQUENCE counts the picks from a fixed start typed in a cell, and INDEX lists the selected rows.Excel 2021 or later (This combination needs Excel 2021 or later)