Function Problems

Create Sequential IDs with a Prefix and Suffix in Excel 365

Maira MehtabMaira Mehtab Nov 20, 2026 869 views

Question details

Create sequential identifiers with a fixed prefix, a four-digit number, and a manually changeable language suffix.

Create Sequential IDs with a Prefix and Suffix in Excel 365
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Generate IDs such as ABC.0001.en and ABC.0002.en while allowing the language code to vary by row.
Observed behavior
Each ID should increment automatically and display the chosen language suffix.
Before you start

Choose an empty column for the IDs and an adjacent column for optional language codes. The example starts in cell A1 and uses column B for suffixes.

Solution 1Recommended

Use a formula with a separate language-code column

Generate numbered IDs while keeping each row's language suffix editable.

1
Enter the formula

In cell A1, enter ="ABC."&TEXT(ROWS($A$1:A1),"0000")&"."&IF(B1="","en",B1).

2
Fill down

Select A1 and drag its fill handle down column A. The IDs increment from ABC.0001.en, with en used when the corresponding cell in column B is blank.

3
Change a suffix

Enter a language code such as fr in B2 to change the ID in A2 to ABC.0002.fr. Edit the cell in column B whenever you need a different suffix.

Use a formula with a separate language-code column
Keep the formula intact: Edit the language code in column B rather than typing over the formula in column A. The sequence depends on row positions, so inserting or deleting rows can change IDs.
Work with sequential IDs in WPS

Create Editable-Suffix IDs in WPS Spreadsheets

Use WPS Spreadsheets to build the same sequential IDs with a formula and a separate language-code column.

  1. 1. Open a spreadsheet: Open WPS Spreadsheets and create a blank workbook or open an existing Excel file.
  2. 2. Enter the ID formula: Select A1 and enter ="ABC."&TEXT(ROWS($A$1:A1),"0000")&"."&IF(B1="","en",B1).
  3. 3. Extend the sequence: Drag the fill handle from A1 down column A to create additional IDs.
  4. 4. Set language codes: Type a code such as fr in the corresponding cell in column B; leave it blank to use en.
Generate four-digit sequential IDs with an editable language suffix.Open and save Microsoft Excel XLSX files.Use familiar spreadsheet formulas and fill handles.Work in a free, easy-to-use office suite.
microsoft office alternative - wps office

Frequently Asked Questions

How do I change the prefix from ABC?

In the formula in A1, replace ABC. with your desired prefix, keeping it inside the quotation marks. Then fill the updated formula down column A.

Can I type a different suffix directly into an ID cell?

Typing directly into a formula cell replaces its formula. Instead, enter the suffix in the corresponding cell in column B.

What happens after ID 9999?

The TEXT format "0000" sets a minimum of four digits, so the next number appears as 10000 rather than resetting to 0000.

How can I keep IDs from changing when rows are inserted or deleted?

After generating the IDs, copy column A and use Paste Special > Values to replace the formulas with fixed text. Set the suffixes first, because the pasted values will no longer update from column B.