LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Script: Clmn A = Row Number

Hey Ansher,

Thanks for the reply! It wasn't exactly what I had in mind, but 95% what I
needed! I made some slight modifications for my needs but still need some
help :-(. Here's what I have now:

A6 content = "1"
A7 content = "=IF(ISBLANK(B8),"",MAX($A$5:A6)+1)" (thus making it "2")

Now if I manually drag that formula down, it properly calculates the
additional line numbers for A8, A9, A10, etc....

Few issues:
1) If I add a new line the middle of my document, I need to re-do the
formula application for all cells below the new line.
1a) Is there anyway to automate this formula? So whenever I delete/add a
row, it automatically adjusts the contents of Column A?

Much thanks!


"Ansher" wrote:

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Script to find smallest number greater than 0 Jeremy Excel Discussion (Misc queries) 3 October 30th 09 08:32 PM
VB Script to Remove Letters from a number Dave M[_2_] Excel Programming 2 August 13th 07 07:48 PM
wnt to look up fr a vlue in a clmn nd get the avg of the row Jeffrey Excel Worksheet Functions 7 May 5th 07 06:57 PM
Formular to insert no.'s fr 1 clmn to multiiple no.'s in another c wise_man Excel Discussion (Misc queries) 1 January 17th 07 12:31 PM
How to increment number using vb script Lillian Excel Programming 4 December 5th 04 02:00 AM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"