+ Reply to Thread
Results 1 to 6 of 6

Formula to Automatically add new ID number to Code

  1. #1
    Forum Contributor
    Join Date
    01-26-2008
    Posts
    124

    Formula to Automatically add new ID number to Code

    I would like to add something (formula) to the following code to automatically add a new ID number with each new entry. Some of the entries will have the same name but each time a new entry is added I want the ID number to increase by 1. Assume that the first entry is 0001.

    Thank You

    Jim O


    Please Login or Register  to view this content.
    Last edited by JOGIER; 07-15-2009 at 05:19 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula to Automatically add new ID number to Code

    Add it where? Maybe like this to add it to column U:
    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 07-15-2009 at 04:14 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    01-26-2008
    Posts
    124

    Re: Formula to Automatically add new ID number to Code

    Sorry, I forget to say what column. I would like it to be column "A".

    Jim O

  4. #4
    Forum Contributor
    Join Date
    01-26-2008
    Posts
    124

    Re: Formula to Automatically add new ID number to Code

    It works but I would like to format the numbers to 0001. I tried to format the column but the number keeps reverting to a single digit.

    Jim O

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula to Automatically add new ID number to Code

    Highlight the entire COLUMN and format as 00000. That works fine. The macro I gave is inserting VALUE only, it is not affecting the existing number format of the cell in any way.

  6. #6
    Forum Contributor
    Join Date
    01-26-2008
    Posts
    124

    Re: Formula to Automatically add new ID number to Code

    That works very well.

    Thank You.

    Jim O

+ 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