Function Problems

How to Generate a Repeating Number Pattern with SEQUENCE in WPS Spreadsheet

Emma BrownEmma Brown Nov 13, 2026 869 views

Question details

The user needs a dynamic array formula that creates a repeating four-value pattern—1, 2, 1, 2, 3, 4, 3, 4—and continues upward by two for each group.

How to Generate a Repeating Number Pattern with SEQUENCE in WPS Spreadsheet
Product
WPS Spreadsheet
Device & OS
not provided
Scenario
Creating a repeating number sequence for tasks such as data simulation, labeling, or testing formulas without dragging the fill handle.
Observed behavior
The intended result is a horizontal spill that repeats each pair of consecutive numbers and then increases the starting number by two for the next group.
Before you start

Make sure your WPS Office version supports dynamic array functions such as SEQUENCE and TOROW. Open the workbook and select an empty row or range where the spilled sequence can appear without overwriting existing data.

Solution 1Recommended

Use TOROW with SEQUENCE to Spill the Repeating Pair Pattern

Best for a single-cell dynamic array formula when your WPS Spreadsheet version supports SEQUENCE and TOROW.

The formula creates a vertical sequence of group offsets—0, 2, 4, 6—and adds the horizontal base pattern {1,2,1,2} to each offset. TOROW then reads the resulting matrix row by row, so the pattern repeats and increases by two after every four values.

1
Select a blank start cell

Open your workbook in WPS Spreadsheet and click a blank cell, such as A1, where the horizontal sequence should begin.

2
Enter the repeating-pattern formula

Type =TOROW({1,2,1,2}+SEQUENCE(n,,0,2)) and replace n with the number of four-value groups you need. For example, =TOROW({1,2,1,2}+SEQUENCE(4,,0,2)) returns 1, 2, 1, 2, 3, 4, 3, 4, 5, 6, 5, 6, 7, 8, 7, 8.

3
Press Enter to fill the sequence

Press Enter. WPS Spreadsheet spills the generated values into adjacent cells to the right, starting from the selected cell.

Use TOROW with SEQUENCE to Spill the Repeating Pair Pattern
Dynamic result: Changing the n argument automatically updates the spilled sequence, so you do not need to copy the formula down or across.
WPS Spreadsheet dynamic arrays

Create Repeating Number Patterns in WPS Spreadsheet with Dynamic Array Formulas

WPS Spreadsheet lets you build the same repeating sequence with SEQUENCE and TOROW in one formula. Open your workbook, enter the formula, and let dynamic arrays spill the pattern across the row—no manual fill required.

  1. 1. Open your workbook in WPS Spreadsheet: Launch WPS Office and open the worksheet where you want the repeating pattern to appear.
  2. 2. Select a blank cell: Click a blank cell, such as A1, where the horizontal sequence should start.
  3. 3. Enter the dynamic array formula: Type =TOROW({1,2,1,2}+SEQUENCE(n,,0,2)) and replace n with the number of four-value groups required.
  4. 4. Press Enter and let WPS spill the pattern: Press Enter. WPS Spreadsheet automatically fills the repeating pattern across adjacent cells to the right.
Creates the 1, 2, 1, 2, 3, 4, 3, 4 pattern from a single formula that updates when you change n.Fully compatible with Excel .xlsx workbooks and familiar Excel functions.Free and lightweight Office suite with a familiar spreadsheet interface.Supports dynamic array functions such as SEQUENCE, TOROW, and other Excel-style formulas.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my formula return only four values instead of the full repeating pattern?

You may have entered SEQUENCE(1,n,0,2) with a horizontal base array. Use =TOROW({1,2,1,2}+SEQUENCE(n,,0,2)) so the vertical group offsets broadcast against {1,2,1,2} and TOROW flattens the resulting matrix.

Can I generate this repeating pattern vertically instead of horizontally?

Yes. Replace TOROW with TOCOL, for example =TOCOL({1,2,1,2}+SEQUENCE(n,,0,2)), to spill the same pattern downward in WPS Spreadsheet.

What does the n argument control in the formula?

The n argument is the number of four-value groups. For 16 total values, use n=4; for 8 total values, use n=2.

Does WPS Spreadsheet support dynamic array functions like SEQUENCE and TOROW?

Current versions of WPS Office support dynamic array functions such as SEQUENCE, TOROW, and TOCOL. If your version does not have them, update WPS Office or use the column-based formula in this article.

How can I make the pattern start at a different number?

Change the start argument in SEQUENCE. For example, =TOROW({1,2,1,2}+SEQUENCE(n,,4,2)) starts each group at 5 and produces 5, 6, 5, 6, 7, 8, 7, 8, and so on.