+ Reply to Thread
Results 1 to 6 of 6

Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to x

  1. #1
    Registered User
    Join Date
    11-15-2014
    Location
    Perth, Australia
    MS-Off Ver
    2013
    Posts
    7

    Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to x

    Greetings!

    I'm trying to use a macro to copy Sheet2 in a workbook and make new sheets up to the value of x/2 (I only need half as many sheets as there are x) which will be defined by Sheet1, cell AH1. x has to be greater than 4 for the macro to run (I already have 2 sheets in the workbook) and I need full sheets so if x=5 i'll need to have the macro round x up to 6 (I'm not sure if this is an actual problem but thought it might be).

    I've included the code that I have got but it's been butchered from a number of different threads and forums so it might might be a hack job.

    If anyone can help that would be fantastic
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Morallach; 11-17-2014 at 10:06 AM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to

    I don't see anything attached

  3. #3
    Registered User
    Join Date
    11-15-2014
    Location
    Perth, Australia
    MS-Off Ver
    2013
    Posts
    7

    Re: Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to

    Quote Originally Posted by davesexcel View Post
    I don't see anything attached
    Hi Dave,

    I've updated it so the attachments are there now. I went to your website and used your VBA for Copy and pasting a range into a new sheet but it didn't appear to work for what I was doing.

    ------------------------------------------------------------------------------

    Please Login or Register  to view this content.
    ------------------------------------------------------------------------------------

    Please Login or Register  to view this content.
    -------------------------------------------------------------------------------------

    If you could assist that would be great. Cheers
    Last edited by alansidman; 11-17-2014 at 11:35 PM. Reason: Making comment clearer

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,865

    Re: Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (Because you are new to the forum, I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to

    Your workbook is protected, you can't add a sheet until it is unprotected.
    The code to copy a sheet is simply,
    Please Login or Register  to view this content.
    SO to copy the sheet when AH1 is changed this should do the trick.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 11-18-2014 at 12:15 AM.

  6. #6
    Registered User
    Join Date
    11-15-2014
    Location
    Perth, Australia
    MS-Off Ver
    2013
    Posts
    7

    Re: Copy/Pasting an excel sheet with the same formatting/formulas in the same work book to

    Thanks Dave. Unfortunately it didn't work the way I needed it to. I'm going to close this post and create a new one with the macro recording I got from Excel

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pasting formulas to another book
    By Acidboy in forum Excel General
    Replies: 4
    Last Post: 06-07-2012, 08:13 PM
  2. Copy active sheet to a new workbook, close that work book and return
    By nig_44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2012, 02:24 AM
  3. Macro to copy data from one excel work book and pase it in another
    By jmsgdin in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-18-2011, 06:34 AM
  4. Macro to copy sheet from closed work book and overwrite if sheet already exists
    By munkee in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-23-2009, 06:36 PM
  5. Find and copy across multi-sheet work book
    By chris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2005, 03:05 PM

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