Script: Clmn A = Row Number
On Apr 28, 6:35*pm, phillr wrote:
I'm creating a list of notes within excel. Due to it's nature, it will be
very long, and also constantly updated with input from others. What I'd like
to do is this:
Setup Column A so that all cells in Column A become a row #, one after the
other, starting at a certain point in my document and continuing onwards.
E.g. Cmn A/Row 5 content = 1
* *Cmn A/Row 6 content = 2
* *Cmn A/Row 7 content = 3
* *etc.. etc...., if I ever add something to the end of the list, it will
automatically add the proper number in Column A.
Can someone help me create and tell me how to setup such a script?
If you could also create it in such a way that it uses variables (e.g. start
numbering from Row XX with starting number YY), that'd be great :D.
Thank you!!
Enter 1 in cell A1. Then what you need to do is whenever there is a
value in Col B, it shd increment by 1 from the last Max value in col
A.
You can use the formula in cell A2. And just copy paste the formula to
as many cells in Col A you need.
=IF(ISBLANK(B2),"",MAX($A$1:A2)+1)
And you can lock these cells having formula and protect the sheet. So
that no one accidently deletes the formula.
Hope this helps.
Ansher
|