+ Reply to Thread
Results 1 to 16 of 16

copy sheet with version

  1. #1
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    copy sheet with version

    Hello,

    I need to create a macro that would allow me to copy a current sheet and name it as version001, version002 etc...

    In the attach file I would need to have a macro that would copy the sheet name "Current" and rename the copied sheet as in the D1 cell(Version0001).

    I would also need if I click again on that button/macro to have another copy of the sheet name "Current" and rename the copied sheet as in the D2 cell(Version0002).

    many thanks in advance for your help!
    Graig
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    Try the attached.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    Thank you! We are pretty close but I need to create the new Sheet only each time I click on the button and not all of them.. The macro should know that IF sheet "Version0002" already exist when I would clik on the button/macro it would copy the "current" sheet and name it "Version0003".

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    Try the amended. Will create one sheet at a time and checks if the sheet exists, it does not,it creates new sheet and exist the sub.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    This is amazing!!! I thought that would not be possible ! THANK you so much for your help!

    one last thing though. Is it possible add to the Macro the following:

    I would also need from the Sheet4 (whatever the name I would put.. Eg: Sheet4 (TEST1) and Sheet5 (TESTA)) to copy the sheet name and paste it in cell G4.

    In fact, in the attach file, you can see that te tab "Current" has in the cell G4 "version001" When I click on "button1" I have a perfect result but the G4 cell does not update.

    Many thanks again!

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    I would also need from the Sheet4 (whatever the name I would put.. Eg: Sheet4 (TEST1) and Sheet5 (TESTA)) to copy the sheet name and paste it in cell G4

    Is G4 on the same sheet name(Sheet4 (TEST1)), or the current sheet?
    As to the button, I have now assigned the code to it, so when you press it, the code runs and can see the result.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    I would need the G4 cell to match the copied worksheet. The current Worksheet should be leave as is.

    So copy sheet (the name of the sheet) should match with G4 cell.

    Please find attach an example (only the current sheet should keep its name in G4, the rest should match with sheet name)

    -> basically next time the button from the current sheet, it should create create the sheet with the name "Version003" and G4 equal to "Version003"

    many Thanks,
    G
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    Try the attached.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    Tis is perfect !! I am so happy about the result! thank you so much for your help!!! To avoid making version with old version do you think I should jst add in your macro to active the "current" sheet or do you think It is possible to remove the macro button to avoid creating a version in an "old/prior" version? That would be Amazin not to have the botton in any "Versionxxx" sheet

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    I am not sure I understand your request, have added a line which activate the current sheet after the end of the code.
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    That gr8. I meant to remove the button in the copied sheets. I wanted to have the button/macro only available in the "current" sheet.

    If it is too complicated. I'll be fine with your solution and I wanted to thank you again for you help! you did great! G

  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    Got it. Try
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    Thanks It is EXACTLY what I was looking forward to getting! I thank you Again and I wish I could be able to do the amazing macro you have created for me!
    THANKS!!!
    Graig

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    Graig,
    You are welcome!
    Could you please now close (Mark) this thread as solved? Go to the top right-hand side of this page, choose "Thread Tools" from the menu, then select "solved" from the drop down menu.

  15. #15
    Forum Contributor
    Join Date
    02-21-2007
    MS-Off Ver
    Microsoft 365 Apps for enterprise
    Posts
    389

    Re: copy sheet with version

    Sorry I thought I did select the option... It is done now.

    can I please ask you one more thing: I need to copy from the sheet "current" in M13 the formula =NOW() and paste (Paste value) into the "Versionxxx" sheets. Is it possible?

    Can you help me on that last thing?

    Thanks,
    Graig

  16. #16
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: copy sheet with version

    When is over until it is truly over.
    Attached Files Attached Files

+ 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