Insert / Delete a line keeping the order

J

JCL

I need to generate a table with a sequential reference number as the first column on the left. Every now and then, one needs to add or delete one (or a number of) row(s) in the middle of the table. How can I automatically re-sequence the table without manual intervention?
Much obliged
JC
 
F

Frank Kabel

Hi
the following formulas will put a sequencing number in column A, if
column B is filled:

in A1 enter the following formula
=IF(B1<>"",1,"")

in A2 enter the formula
=IF(B2<>"",MAX($A$1:OFFSET($A2,-1,0))+1,"")
and copy this formula down for as many rows as you like
 
J

JCL

Thank you Fran
It almost does what I want (or what I need). Deleting is fine. Unfortunately, once I inserted a row, I have to go through the exercise of copying the previous C1Rx cell to the one I just inserted. This is awkward as I would like to protect Column 1 from the users.
Your help is much appreciated
Rgd
JCL
 
Top