+ Reply to Thread
Results 1 to 6 of 6

Copy sheet and rename based on week number

  1. #1
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Copy sheet and rename based on week number

    Hi,

    I have a workbook for each qtr. Each book is to have a single sheet for each week. These sheets will be named after the ISO week number i.e. Week1, Week2 etc. At the start of the qtr, there will be just one sheet...say Week26...each Monday a copy is to be made of the last sheet and the week number incremented by one...i.e. copy the sheet and all it's contents from Week26 to Week27.

    I'm new to VBA and have been searching this forum and have some great code...can't seem to get the right thing to increment by one though...any help?
    Last edited by racton; 10-14-2011 at 11:32 AM.

  2. #2
    Registered User
    Join Date
    08-04-2010
    Location
    SLC, UT
    MS-Off Ver
    Excel 2003, 2007
    Posts
    31

    Re: Copy sheet and rename based on week number

    Two lines like this ought to do it for you:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy sheet and rename based on week number

    From a logic standpoint, when you know the "string to remove to get the number" is consistent:


    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!)

  4. #4
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Re: Copy sheet and rename based on week number

    Many thanks for the post. Really appreciated.

  5. #5
    Registered User
    Join Date
    10-12-2011
    Location
    London
    MS-Off Ver
    Office Mac 2011
    Posts
    7

    Re: Copy sheet and rename based on week number

    many thanks...and so simple ;-)

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copy sheet and rename based on week number

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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