Function Problems

Create Continuous Numbering for Names with Blank Rows in WPS Spreadsheets

Huma Ashraf ChHuma Ashraf Ch Nov 12, 2026 868 views

Question details

Create sequential numbers beside names while leaving the number cell empty whenever the corresponding name cell is blank.

Create Continuous Numbering for Names with Blank Rows in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
Names are entered in column B, and a numbering column is needed in column A starting from row 2.
Observed behavior
The numbering should remain continuous across blank rows and automatically update as names are added, deleted, or moved.
Before you start

Confirm which column contains the names and which row contains the first name. The formula below assumes names start in B2 and numbering starts in A2; adjust the references if your table starts elsewhere.

Solution 1Recommended

Use an IF and COUNTA formula to skip blank name rows

Use this method when you want a number only beside nonblank names, with continuous numbering even when blank rows appear in the list.

The IF function checks whether the current name cell is empty. COUNTA then counts all nonblank name cells from the first name row through the current row, so each entered name receives the next number.

1
Select the first numbering cell

In WPS Spreadsheets, click cell A2, the cell beside the first name cell B2.

2
Enter the continuous numbering formula

Type =IF(B2="","",COUNTA($B$2:B2)) in A2, then press Enter.

3
Fill the formula down the numbering column

Select A2 and drag the fill handle in the lower-right corner down through the rows where names may be entered. You can also copy A2 and paste it into the required cells in column A.

4
Test a blank row and a new name

Leave a cell in column B blank to confirm its matching cell in column A stays blank, then enter a name in column B to confirm the numbering updates automatically.

Use an IF and COUNTA formula to skip blank name rows
Continuous numbers are preserved: For example, if B2 and B4 contain names while B3 is blank, A2 displays 1, A3 remains blank, and A4 displays 2.
WPS Spreadsheets formula guide

Automatically Number Nonblank Names in WPS Spreadsheets

WPS Spreadsheets lets you use the IF and COUNTA functions to create a dynamic numbering column. The formula leaves number cells empty for blank name rows and recalculates the sequence when list entries change.

  1. 1. Open the worksheet in WPS Spreadsheets: Open your name list and identify the name column, such as column B.
  2. 2. Choose the first number cell: Click the cell beside the first name, such as A2.
  3. 3. Apply the blank-row numbering formula: Enter =IF(B2="","",COUNTA($B$2:B2)) and press Enter.
  4. 4. Extend the formula to later rows: Drag the fill handle from A2 down the numbering column so each row evaluates its corresponding name cell.
Creates continuous numbering while skipping blank rowsAutomatically updates numbers as names are added or removedSupports Excel-compatible .xlsx and .xls spreadsheetsProvides familiar formulas and fill-handle tools for spreadsheet lists
QA img-9

Frequently Asked Questions

Why does the formula leave the numbering cell blank?

The IF(B2="","",...) portion checks whether the matching name cell in column B is empty. If it is empty, the formula returns an empty result instead of a number.

How do I change the formula if my names start in another row?

Replace B2 and $B$2 with the first name cell in your list. For example, if names begin in C5 and numbers begin in B5, use =IF(C5="","",COUNTA($C$5:C5)).

Will the sequence update after I delete a name?

Yes. COUNTA recalculates the count of nonblank cells in the name range, so the remaining names are renumbered continuously after a name is deleted.

Can I use this formula in an Excel .xlsx file opened with WPS Spreadsheets?

Yes. IF and COUNTA are compatible spreadsheet functions, and the formula can be used in Excel .xlsx and .xls files in WPS Spreadsheets.