+ Reply to Thread
Results 1 to 2 of 2

Generate sequential number after pressing button and create a tracking list.

  1. #1
    Registered User
    Join Date
    10-27-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    11

    Question Generate sequential number after pressing button and create a tracking list.

    Hey all,

    I need a way to create sequential numbers after pushing a button for offers being made to clients and keep track of the offernumbers with client info included. So per example:

    Cell A1 would show the number which should be filled with a sequential number each time the button is pressed. On sheet 2, these numbers should be saved. So after pressing the button, in cell A1 on sheet 2 the number will appear.
    Than after pressing the button again on sheet 1 cell A1 should be refilled with the next number in line. While in sheet 2 this number should be filled in B2.

    So if this can be done i would like to go one step futher.

    Lets say in that on the first worksheet cell B1 says: Mr. Doodle C1 says: adres x D1 says: city x.
    When ever the buton is pressed and the next number in line will be generated in A1 i want the info of cell B1, C1, D1 also to be copied unto sheet to and than (if this is next empty column) in B2 be filled Mr. Doodle, C2 Adres x, D1 city x.

    Also it would be nice if the button would bring up an confirmation popup so that creating a new number is not done accidently, or even a password would do the trick i guess.

    Any suggestions.

    Ps. I included a workbook for some more clarity.
    Attached Files Attached Files
    Last edited by JBeaucaire; 11-03-2012 at 03:54 AM. Reason: Moved to VBA forum, please use the correct forum for the question being asked. Thanks.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2013 on Win10 (desktop), 2007 on Win10 (notebook)
    Posts
    8,096

    Re: Generate sequential number after pressing button and create a tracking list.

    Hi, Sam Kuiper,

    instead of typing each and every customer and address each and every time I would think about using a database for that and giving each customer/delivery address a unique number on the left side of the data block to be used with VLookup for the ease of maintenance.

    The macro could look like this:

    Please Login or Register  to view this content.
    The new number is essentially the Max of numbers in Column A on Sheet2 plus ,0001 - it may be altered but will reflect on the next save.

    Also it would be nice if the button would bring up an confirmation popup so that creating a new number is not done accidently, or even a password would do the trick i guess.
    The new number isnīt entered into the list until the button is pressed - if somebody alters the list in the meantime the value in Range("A1") could be checked via the Max function prior to writing.

    Ciao,
    Holger
    Attached Files Attached Files
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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