Automatic list numbering


In Excel, to consecutively number items in non-consecutive cells, simply plug formulas that refer to the cells in column B into column A's cells. The formula =IF(B1<>"",COUNTA($B$1:B1)&".","") displays the next consecutive item number if a cell has something in it; if a cell is empty, it displays nothing.

Caption: Formulas in column A display consecutive numbers in non-consecutive cells

After you have entered the formula, you can copy it down the column as many times as you need to handle all of the items you'll be entering.

For 1-2-3, use the following formula to produce the same result:

@IF(B1="","",@STRING(@COUNT($B$1..B1),0)&".")

- John Walkenbach


Category: spreadsheet
Issue: June 1999

These Web pages are produced by Australian PC World © 1999 IDG Communications