# Show index number next to each nonempty row [closed]

Hello there,

Would you please help me on this, I want to know how to show number next to each row of data as in: data in column B start at row 6 and goes on to about 100, I want to show the numbering in column A example: A B

1 data

2 data

3 data

.

.

.

etc

I know how make the number manually from first cell and drag till last one, but I want this to be automatic numbering so any time I enter a new data in column B, an index number will show in column A.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by MuhammadOsta close date 2020-07-14 13:46:46.286873

Sort by » oldest newest most voted

Please try with the following formula in your cell A6 to A100:

NB. The formula should be Exactly the same in each cell, so you better Copy-Paste it 94 times down from cell A6 until cell A100, instead of dragging the handle. ( Else the reference to B6 will be altered with each row, instead of staying fixed at “B6” for all rows. )

=IF(ISBLANK(INDIRECT("B" & ROW()));""; ROW() - 5 - COUNTBLANK(B6:INDIRECT("B" & ROW())))

HTH, lib

more