+ Reply to Thread
Results 1 to 4 of 4

Macro for Auto Inserting a Number Incrementally (+1) in the footer of Excel 2010

  1. #1
    Registered User
    Join Date
    05-24-2012
    Location
    Vancouver, Washington
    MS-Off Ver
    2010
    Posts
    9

    Talking Macro for Auto Inserting a Number Incrementally (+1) in the footer of Excel 2010

    I'm sorry if this has been discussed elsewhere but I have been looking all over for this answer. I feel like this is my last resort; I hope you can help.

    I am in charge of developing forms on Excel. With ONE worksheet containing only ONE form, each workbook will have any number of worksheets (from 1 to over 200). Also, the forms are quite diverse in size and shape.
    I have created a macro designed to insert the required header and footer information, for each form (AKA each worksheet), simultaneously for the entire workbook (see code below).

    Now here is my challenge. Within the required footer information, each worksheet (form) must have a unique number (e.g., 7510001); the department is 751 and the first form number will be 0001. The next form (worksheet) must have the number 7510002 in its footer information, and so on.

    Before running the macro I will edit the first number in Visual Basic (code is run from Add-in), and then have the macro populate the rest of the worksheets, within that workbook, by increments of 1. I have multiple workbooks and will need to pick up numbering where I left off in a previous workbook. I can do this manually as I need to change the header information on each workbook.

    Is this possible?

    Thank you in advance.

    Bob
    Please Login or Register  to view this content.

  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: Macro for Auto Inserting a Number Incrementally (+1) in the footer of Excel 2010

    Bob,

    Welcome to the forum!
    You stated you would be changing the start number from within the VBA code manually. In that case, this should do the trick:
    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
    Registered User
    Join Date
    05-24-2012
    Location
    Vancouver, Washington
    MS-Off Ver
    2010
    Posts
    9

    Re: Macro for Auto Inserting a Number Incrementally (+1) in the footer of Excel 2010

    Tigeravatar, you rock!! That is just what I needed. Thank you.

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

    Re: Macro for Auto Inserting a Number Incrementally (+1) in the footer of Excel 2010

    You're very welcome

+ 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