+ Reply to Thread
Results 1 to 10 of 10

Copy Sheet & Create New Monthly Sheet From Present Sheet

  1. #1
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Copy Sheet & Create New Monthly Sheet From Present Sheet

    I want to create a macro button that can create copy, insert, paste and rename the new sheet in next month's name, like if the active sheet's name is January, I want to copy the whole sheet of January, insert new sheet, paste the new sheet and rename the new sheet to next month like February?

    Also rename the new sheet (February) cell B3 the same as new sheet's name (February)

    So if month of February is near end, the macro button in February will create the same way as Jan did which means the next sheet will be named March and so on.

    Thank you in advance
    Last edited by unley; 01-12-2010 at 08:40 PM.
    I'm using MS Office 2013

  2. #2
    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 & Create New Monthly Sheet From Present Sheet

    1) Put this formula in B3 so that you can have the sheetname always appear on its own without needing VBA:

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)

    2) We're always copying the current LAST sheet in the workbook, correct? Then renaming it? Also, is there any particular cells or range of cells you want "reset" or cleared of their prior values?
    _________________
    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!)

  3. #3
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Hi There

    Hope this helps

    Please Login or Register  to view this content.
    Cheers

    Jim

  4. #4
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Yes, you're both right JBeaucaire & JimmyA, thank you very much. JBeaucaire's code is just what I want to copy Sheet's name and JimmyA's code is much better than I thought.

    To answer JBeaucaire's question regarding clearing cells is yes, the cells I want to clear are B8:B12 and B30:AF31

    Maybe JimmyA may be able to add codes to clear those cells.

  5. #5
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Hope this helps

    Please Login or Register  to view this content.
    I'm off to bed now!! Maybe you could add to my reputation by clicking the scales on my post.

    Cheers

    Jim

  6. #6
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Brilliant Jim, thank you very much for such quick reply. 'ave a good night sleep mate and yes I'll up your reputation as well to JBeaucaire

  7. #7
    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 & Create New Monthly Sheet From Present Sheet

    This is a automatic macro. It will copy the last sheet in the workbook then rename it based on evaluating the B3 value from the copied sheet.
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor unley's Avatar
    Join Date
    11-27-2008
    Location
    South Australia
    MS-Off Ver
    MS Office 2007
    Posts
    253

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Thank you JBeaucaire for new codes, I'll try this out as well

    Cheers mate

  9. #9
    Registered User
    Join Date
    02-16-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Copy Sheet & Create New Monthly Sheet From Present Sheet

    Could you please help me out by providing the same code without msg box. My requirement the sheet named as "Template" should be inserted n number of times( for eg if b1 is 16 then it should insert template sheet 16 times ) rename on its own based on the data in A1,A2,A3 and so on. This range is on another sheet in same workbook named as 'Control Sheet". Kindly help. waiting for ur expert opinion.
    Thanks and regards
    Mayank

  10. #10
    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 & Create New Monthly Sheet From Present Sheet

    Meet2mayank,

    Be sure to read through the Forum Rules so you can use and follow them effectively. Your post breaks rule #2. You must start your own thread with your own questions and your own criteria.

    When you post your thread, you can include links to this thread or code as you deem relevant.

+ 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