+ Reply to Thread
Results 1 to 5 of 5

Copy a sheet (from template) to a new sheet, and rename (based on cell value)

  1. #1
    Registered User
    Join Date
    03-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    18

    Copy a sheet (from template) to a new sheet, and rename (based on cell value)

    Hi,

    I've been searching around on the forum, but can't find the a solution for this. I'm not very advanced when it comes to VBA, but hoped I could find a suitable solution for my problem:

    I have a template sheet called "TEMPLATE". After putting in information in the template I want to copy this sheet to a new sheet and rename the new sheet based on the cell value in cell "B4" in the template. I would like to copy values and formats (no formulas).

    I also want the latest copy of the template to be arranged as sheet number 5 (from the left) in the workbook (i.e. I have 4 sheets which I always want to keep first/to the left in the workbook).

    I have tried to explain this by giving a simple example in the attached workbook.

    If somebody have any suggestions of how I can do this, I would be very happy! :-)
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a sheet (from template) to a new sheet, and rename (based on cell value)

    Try this...

    Please Login or Register  to view this content.
    Your description says you want to copy the new sheet to position 5 but your example workbook says you want the new sheet copied to position 6. Change the red 4 in the code to suit.

  3. #3
    Registered User
    Join Date
    03-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Copy a sheet (from template) to a new sheet, and rename (based on cell value)

    Quote Originally Posted by AlphaFrog View Post
    Try this...

    Please Login or Register  to view this content.
    Your description says you want to copy the new sheet to position 5 but your example workbook says you want the new sheet copied to position 6. Change the red 4 in the code to suit.
    Thank you very much, it is almots what I need. The problem is that I want to copy values and formats only. Not formulas. Do you have a suggestion for this as well? Thanks in advance :-)

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a sheet (from template) to a new sheet, and rename (based on cell value)

    Quote Originally Posted by Siglen View Post
    Thank you very much, it is almots what I need. The problem is that I want to copy values and formats only. Not formulas. Do you have a suggestion for this as well? Thanks in advance :-)
    Try this...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-02-2012
    Location
    Bergen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Copy a sheet (from template) to a new sheet, and rename (based on cell value)

    Thank you, works perfect!

+ 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