logo
search
Function Problems

How to Autofill a Repeating Text and Number Sequence in Excel

Bushra ParveenBushra Parveen Oct 20, 2026 869 views

Question details

The user needs an Excel formula to generate a repeating sequence of alphanumeric text that increments a number every three rows while cycling through specific suffixes.

How to Autofill a Repeating Text and Number Sequence in Excel
Product
Excel
Device & OS
not provided
Scenario
Creating a custom repeating sequence of text and numbers in a spreadsheet.
Observed behavior
The goal is to automatically calculate and generate a custom sequence (e.g., A1, A1D, A1X, A2, A2D, A2X) without typing each value manually.
Before you start

Determine the exact starting cell for your sequence, as the formula relies on absolute and relative row references to calculate the increments correctly.

Solution 1Recommended

Use a Combined Formula with QUOTIENT, ROW, and INDEX

This formula mathematically calculates the row difference to increment the sequence number and cycle through an array of text suffixes.

The formula combines text strings with mathematical functions. The QUOTIENT function handles the number incrementing every three rows, while the INDEX and MOD functions cycle through the specific text suffixes.

1
Select starting cell

Click on the cell where you want your sequence to begin (for example, E7).

2
Enter the sequence formula

Type or paste the following formula into the formula bar: ="A"&QUOTIENT(ROW(E7)-ROW($E$7),3)+1&INDEX({"","D","X"},MOD(ROW(E7)-ROW($E$7),3)+1)

3
Generate the first item

Press the Enter key. The cell should now display the first item of your sequence (e.g., A1).

4
Autofill the sequence

Click the cell again, hover over the small square at the bottom-right corner (the fill handle) until your cursor becomes a cross, and drag it downwards to fill the remaining rows.

Use a Combined Formula with QUOTIENT, ROW, and INDEX
Adjusting Cell References: If your sequence begins in a different cell, you must change both instances of E7 and $E$7 in the formula to match your actual starting cell's reference.
Advanced Spreadsheet Features

Generate Advanced Sequences in WPS Spreadsheet

WPS Spreadsheet fully supports advanced array formulas, INDEX, and MOD functions, making it incredibly easy to manage complex text and number sequences.

  1. 1. Open WPS Spreadsheet: Launch WPS Office and open your workbook.
  2. 2. Paste the formula: Select your starting cell and paste the sequence formula into the formula bar.
  3. 3. Apply and autofill: Press Enter, then click and drag the fill handle down to populate your sequence.
Fully compatible with Microsoft Excel formulas and .xlsx formats.Easily drag and drop to autofill complex sequence formulas.Lightweight and runs smoothly on Windows, Mac, and Linux.Free to use for everyday spreadsheet and data organization tasks.
microsoft office alternative - wps office

Frequently Asked Questions

How do I change the sequence prefix from 'A' to something else?

In the formula, locate the "A" at the very beginning and replace it with your desired text. For example, change it to "Item-" or "B" depending on your needs.

Can I adjust the formula to increment the number every 4 rows instead of 3?

Yes. Change the divisor number in both the QUOTIENT and MOD functions from 3 to 4. You must also add a fourth text suffix to your INDEX array, such as {"","D","X","Y"}.

Why does my sequence show an error when I move the starting cell?

The formula relies on a fixed starting point using absolute references (like $E$7). If you move the formula to a different starting cell, you must update those references in the formula to match the new location perfectly.

Are these sequence formulas supported in WPS Spreadsheet?

Absolutely. WPS Spreadsheet is fully compatible with the ROW, QUOTIENT, MOD, and INDEX functions, meaning this formula will execute identically to how it does in Microsoft Excel.