+ Reply to Thread
Results 1 to 4 of 4

Need macro/script to generate serial number labels

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Question Need macro/script to generate serial number labels

    Model B Box Labels.xlsx

    Take a look at this spreadsheet. The cells and spacing are so that, when printed, the text prints nicely on avery address labels. These labels are then affixed on our products.

    I would like to make a macro or vba script that will look at the last serial number on the page (in the lower right hand corner) and then generate the next page of serials numbers starting with the next number in the sequence (when compared to the last number in the lower right hand corner). Ideally, the worksheet would just have a button that the user would click and it would automatically generate a page of numbers.

    Is it possible to have the script view the value in the last cell, then overwrite the whole page (including the cell its using to reference) with new serial numbers? Or do I need to copy the last value to a location that wont get overwritten and then reference it from there?

    I realize that I could just make page after page of serial numbers, but I would prefer to have a macro that would just make a new page each time it was clicked.


    Thanks.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need macro/script to generate serial number labels

    c.young,

    Welcome to the forum!
    Give this a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need macro/script to generate serial number labels

    Alternate line to get initial value of nSerial:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-04-2012
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Need macro/script to generate serial number labels

    Tiger, You the man! That worked perfectly! Thanks so much.

+ 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