+ Reply to Thread
Results 1 to 6 of 6

Index page numbers on worksheets

  1. #1
    Registered User
    Join Date
    05-31-2008
    Location
    chicago,Illinois,USA
    Posts
    29

    Index page numbers on worksheets

    Need a macro to index page numbers so that it sees total number of pages and opens up that many tabs and next tab will show Page 2 of 5, Page 3 of 5 etc.

    sample file attached. Thanks
    Attached Files Attached Files
    Last edited by rm7302; 06-03-2010 at 12:35 PM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Index page numbers on worksheets

    Try this
    Please Login or Register  to view this content.

    Enter the number of sheets you want in cell D10, run the macro

    Delete all the new sheets leaving Page 1 of D10 value

    Run the macro with a new value in D10

    This Macro will only work if there is one sheet in the workbook.

    EDIT

    Corrected this error in message
    This Macro will only work when there is more than one sheet in the workbook.
    Thanks romper
    Attached Files Attached Files
    Last edited by Marcol; 06-03-2010 at 09:57 AM.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Index page numbers on worksheets

    Quote Originally Posted by Marcol View Post
    This Macro will only work when there is more than one sheet in the workbook.
    You mean it won't work if there's more than one...
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Index page numbers on worksheets

    Correct romper, you are really on fire today!!!, ..... and I am having a bad hair day!!!

  5. #5
    Registered User
    Join Date
    05-31-2008
    Location
    chicago,Illinois,USA
    Posts
    29

    Re: Index page numbers on worksheets

    Thanks for your reply Marcol, but this is what I want..........

    I do not want the tabs to be "Page 1 of …..", the tabs are still going to show 1,2,3 etc depending on the value in cell D10. But in each worksheet the value in cell B10 is going to index by the tab number. For example worksheet 2, row 10 will read Page 2 of 10, for worksheet 3, row 10 will be Page 3 of 10.

    Thanks again.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Index page numbers on worksheets

    Is this better?

    Please Login or Register  to view this content.

    Same rules as before still apply

    Hope this helps.

    If you need any further information, please feel free to ask further

    However

    If this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody!
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

+ 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