+ Reply to Thread
Results 1 to 7 of 7

Copy worksheet and rename based on cell range

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Copy worksheet and rename based on cell range

    Hi,

    I have created a master sheet that I want to replicate. I have a range say A1:A15 with names (test values) of Aug 11, Sep 11 etc.

    Instead of creating forms for the next few years manually. I want to create them copying the master and then rename based on the cell value, then cycle through.

    I have some starting code but would really appreciate some guidance:

    Please Login or Register  to view this content.

    This code just uses the current date. I would like to use a cell range.

    Thank you,

    JP
    Last edited by jpruffle; 08-08-2011 at 06:54 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Copy worksheet and rename based on cell range

    hi, jpruffle, please check attachment, run code "test" hope this helps.

    To make actions over objects in VB it's not required to select them.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Copy worksheet and rename based on cell range

    Thank you that works a treat. Will test it with my work later.

  4. #4
    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 worksheet and rename based on cell range

    A slight update on watersev's macro, one would assume there is a template sheet to copy, and also that you would like to list any number of items in column A of your "List" sheet.

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

  5. #5
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Copy worksheet and rename based on cell range

    Thank you, both methods work great.

    In addition to creating new sheets named as per range A1:A15 (with test values of Aug 11, Sep 11 etc). I also have additional information in columns B1:B15 and C1:C15. I would like the value in column B to be copied to cell D1 (text value) and the value in column C to be copied to cell D2 (format DD/MM/YYYY) on the new sheet that corresponds to the test values.

    Is that at all possible. I have created a new workbook to explain.

    Thank you in advance.

    JP
    Attached Files Attached Files

  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 worksheet and rename based on cell range

    Like so:
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-03-2008
    MS-Off Ver
    Excel 2007 (also have access to Excel 2000/2003)
    Posts
    368

    Re: Copy worksheet and rename based on cell range

    Thank you, that works great.

    JP

+ 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