Function Problems

How to Generate Sequential Numbers with Alternating Suffixes in Excel

Bushra ParveenBushra Parveen Nov 11, 2026 869 views

Question details

The user wants to automatically generate a sequence of numbers where each number is duplicated with alternating suffixes, such as 'A' and 'B' (e.g., 19-001A, 19-001B, 19-002A, 19-002B).

How to Generate Sequential Numbers with Alternating Suffixes in Excel
Product
Excel
Device & OS
not provided
Scenario
Creating specific project identifiers, inventory tags, or dual tracking codes in bulk without manual data entry.
Observed behavior
Instead of typing each identifier one by one, the user seeks a dynamic array formula to generate the full sequence automatically in a single column.
Before you start

Ensure you are using a version of Excel that supports dynamic array formulas, such as Microsoft 365 or Excel 2021, as the SEQUENCE and TOCOL functions are required for this method.

Solution 1Recommended

Use TOCOL and SEQUENCE with an Array Constant

Combine the TOCOL, SEQUENCE, and TEXT functions with an array constant to quickly generate an alternating suffix list in a single column.

This formula works by generating a numerical sequence, formatting it with leading zeros and a prefix using the TEXT function, appending the 'A' and 'B' suffixes, and finally flattening the result into a single column using TOCOL.

1
Select the destination cell

Click on the cell where you want the first sequential identifier to appear.

2
Enter the formula

Type the formula: =TOCOL(19&TEXT(SEQUENCE(999),"-000")&{"A","B"})

3
Apply and spill the array

Press Enter. The dynamic array will automatically spill down the column, generating 19-001A, 19-001B, 19-002A, and so forth.

Use TOCOL and SEQUENCE with an Array Constant
Adjusting Sequence Length: Change the number '999' in the SEQUENCE function to the exact number of base values you need to generate.
Efficient Spreadsheet Management

Use WPS Spreadsheet to Handle Dynamic Arrays and Sequences

WPS Spreadsheet provides excellent support for advanced data generation and dynamic arrays. You can easily create complex tracking codes, format sequential numbers, and manage large datasets efficiently using standard formulas.

  1. 1. Open your worksheet: Launch WPS Spreadsheet and select an empty cell where you want your sequence to begin.
  2. 2. Input the sequence formula: Type your formula combining the TEXT, SEQUENCE, and array features to define your prefix and suffixes.
  3. 3. Generate the data: Press Enter and let WPS Spreadsheet dynamically populate the rows with your customized tracking identifiers.
High compatibility with Microsoft Excel formulas, including TEXT and arrays.Built-in support for advanced data filling and auto-formatting tools.Lightweight application that loads large sequential datasets instantly.Free and user-friendly interface for effortless data management.
microsoft office alternative - wps office

Frequently Asked Questions

Why am I getting a #NAME? error when using TOCOL or SEQUENCE?

This error occurs if your version of Excel does not support dynamic array functions. You need Microsoft 365, Excel 2021, or a modern spreadsheet tool like WPS Spreadsheet that supports these advanced functions.

How can I change the suffixes to something other than A and B?

Simply modify the array constant {"A","B"} in the formula to your desired text strings, such as {"X","Y"} or {"Morning","Evening"}.

How do I make the sequence spill horizontally instead of vertically?

To generate the sequence across columns in a single row, replace the TOCOL function with the TOROW function in your formula.

Can I use HSTACK instead of the bracket array constant?

Yes, you can substitute {"A","B"} with HSTACK("A","B") if you prefer using a function over standard array notation. This is particularly useful when combining dynamic cell references instead of hardcoded text.