+ Reply to Thread
Results 1 to 4 of 4

Autonumbering

  1. #1
    Registered User
    Join Date
    06-07-2008
    Posts
    31

    Autonumbering

    Hi,

    Hope you can help.

    Example:

    (row) (Name) (age) (***)
    1 James 34 m
    2 Sarah 26 f
    3 Joshua 45 m

    What im doing currently is having the row column auto number and a macro that rejigs the autonumber if someone inserts a new row in between any of the data.

    Id like it if the autonumbers could stay as they are and the line inserted gets the autonumber as a letter.

    Example:

    (row) (Name) (age) (***)
    1 James 34 m
    2a Sarah 26 f
    2b Emilye 12 f
    2c Adrian 3 m
    3 Joshua 45 m

    Can anyone help.

    Thanks in advance.
    Last edited by jonnygrim; 07-18-2008 at 04:31 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    How should the macro distinguish between a row inserted between Adrian and Joshua, which presumably should result in '2d' and a line inserted between Sarah and Emilye? What should this contain? also 2d or should the existing number 2? values be renumbered with Emilye now 2c?

    Thought I'd mention that you can get cells to auto number by using the ROW() + (any constant) function. This of course always gives you numerics which it sounds like you don't want.

    Regards

    Regards

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    if you pre number all rows
    then this macro will auto insert and sub number it eg
    1
    2
    3
    4
    cilck on 3 run macro and you get
    1
    2
    3
    3.1
    4
    Please Login or Register  to view this content.
    i know its not letters but it's the best i can do!
    i dont know the code to make it only run if cell is in the numbers column tho
    "only run this macro if cell is in range a:a" to prevent it being run in the wrong place

  4. #4
    Registered User
    Join Date
    06-07-2008
    Posts
    31
    Thankyou both of you, you really have been a great help to me.

    Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1