+ Reply to Thread
Results 1 to 8 of 8

Copy Sheet, Rename.

  1. #1
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Copy Sheet, Rename.

    Hey, I am trying use a Macro to copy a sheet called "Copy" and then rename it with the month January and then copy data from another sheet into it. Now this will happen every month and I need the macro to somehow read that the month January is already there and create the new sheet under the name February and the same for the month of March and so on and so forth.

    The whole macro is under the name "Sheet_copy" and it is too long to post here, so I will post up a demo file. This is the first part of the code that I did. Don't laugh, b/c I don't know how to write code so I just used the record macro function.

    Please Login or Register  to view this content.

    And on the off chance someone is willing to streamline the code for everything else that I am having it do it would be very much appreciated.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Copy Sheet, Rename.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy Sheet, Rename.

    Thanks Nimrod,

    I just tried it but I stoped at this point

    Please Login or Register  to view this content.
    Do I have to change this to something else?

    Thanks

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Copy Sheet, Rename.

    Yes .. that's right ... you need to change ("SampleDataSh") to the name of your data sheet.

  5. #5
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy Sheet, Rename.

    That worked great for the sheet name change, but this part of my original code did not work?

    Copying the data from Data sheet. The names copied fine , but the other data did not get copied. This ,I think is what needed to be done.

    Please Login or Register  to view this content.
    This is just a sample , if I posted the whole thing it go on forever.

    And it is unbelievable how short you were able to do that. I have another sheet layout that I need similar sort of macro as well. Could I post that up and you have a look at it for me. It would be very much appreciated.

    Dave

    Edit, I forgot to mention it is linked to the same data sheet and is in the same book as I am posting, I just did not put it in the demo file. This sheet is much more simpler.
    Last edited by JapanDave; 04-01-2011 at 01:25 AM.

  6. #6
    Valued Forum Contributor
    Join Date
    09-21-2003
    Location
    British Columbia , Canada
    MS-Off Ver
    03,07,10,13
    Posts
    727

    Re: Copy Sheet, Rename.

    The code in your book went on forever to the point I gave up trying to read it. However if you tell me in a couple of sentences what you want to do I could ... one step at a time... I could try to write the code for you. For example was are you trying to do with this last piece of code you pasted.

  7. #7
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy Sheet, Rename.

    I am really sorry for that , I just only know how to record a macro.

    I posted a new book with that extra sheet, I left explanations for you, hopefuly that will explain things and make what I am after a little clearer. I am really am very greatful for your help.

    Dave
    Attached Files Attached Files
    Last edited by JapanDave; 04-01-2011 at 03:48 AM.

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Copy Sheet, Rename.

    Any one got any idea on this last book I posted? I am still trying to figure it out myself, but it is way above my level.

+ 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