+ Reply to Thread
Results 1 to 5 of 5

Auto-generate part numbers list in one column

  1. #1
    Registered User
    Join Date
    10-17-2014
    Location
    Wausau, WI
    MS-Off Ver
    2014
    Posts
    17

    Auto-generate part numbers list in one column

    I am looking for help auto-generating a part numbering list in one column. I want it to trigger when you enter into the row below the previous part number.

    An example part number would be 915010001.
    The "9" is constant no matter what.
    "15" signifies that it is the year 2015
    "01" signifies that it is the month of January
    "0001" means that it is the first part number of the month
    Another example:
    912111245
    "9" is constant
    It is made in the year 2012 (12)
    It is made in the month of November (11)
    It is the 1,245th part made that month

    Attached is what the spreadsheet will look like.
    Possibly a msgbox error handler would help because many people who do not know anything about VBA will be using this spreadsheet.
    PartNumbering.jpg

  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: Auto-generate part numbers list in one column

    This event should take care of it. Right-click the sheet tab and VIEW CODE, paste this into the empty sheet module that should appear.

    Please Login or Register  to view this content.
    _________________
    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
    Registered User
    Join Date
    10-17-2014
    Location
    Wausau, WI
    MS-Off Ver
    2014
    Posts
    17

    Re: Auto-generate part numbers list in one column

    Awesome! This is exactly what I need! Also, is there a way to be able to delete the row if there is a mess-up? Right now it keeps coming back after I delete it.
    edit: I added an "Else:" to the first If statement
    HTML Code: 
    Last edited by yohanmcdonald; 02-10-2015 at 09:45 AM.

  4. #4
    Registered User
    Join Date
    10-17-2014
    Location
    Wausau, WI
    MS-Off Ver
    2014
    Posts
    17

    Re: Auto-generate part numbers list in one column

    I guess I jumped the gun on that one. I added the "Else:" and now it deletes the part number when I add anything in the same row.

  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: Auto-generate part numbers list in one column

    You can disable macros anytime you want by clicking the DESIGN MODE button on the Developer tab, then you can delete anything you want until you turn DESIGN MODE back off again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto-Generate List from reference cells based on data validation list selection
    By BoundCustomDesign in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-13-2014, 11:06 AM
  2. Replies: 1
    Last Post: 06-26-2013, 07:08 PM
  3. generate part list
    By stefsjenko in forum Excel General
    Replies: 7
    Last Post: 03-15-2013, 08:06 AM
  4. Auto generate numbers
    By MNB123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2010, 10:33 AM
  5. [SOLVED] Auto generate numbers in decending order in a column
    By JsJ in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-09-2005, 11:35 AM

Tags for this Thread

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