+ Reply to Thread
Results 1 to 5 of 5

Macro to copy from a template to worksheets from a list of worksheets

  1. #1
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    4

    Macro to copy from a template to worksheets from a list of worksheets

    Hello all. This is my first post! I've been scouring the internet for a solution to my question and have found nothing yet. I know what I want to do, but can't for the life of me figure out how to get it done. Here's what I have: A workbook to keep track of employees vacation hours, sick time, etc. Each employee has a worksheet with a calendar on it and the previous year below the current year. I have an index page with the employee list and links to each sheet for each employee. at the beginning of next year I want to be able to run a script that will take the 2018 calendar and move it to the 2017 position and then copy a 2019 calendar from a template and put it where the 2018 one was. But I want to do this for every employee sheet. Here's a brief summary of what needs to happen:

    List of worksheets to be edited on “Employees” Sheet. range A3:Axxx


    Go to employee sheet from list.
    Copy cells. B7:BK30
    Paste cells further down sheet (B46:BK69).
    Then go to “Calendar” sheet.
    Copy cells. B7:BK30
    Return to previous sheet and paste to same range as above. (Replace B7:BK30 with data and formatting
    from “Calendar” B7:BK30)
    Then perform same operations on the next sheet on the list.
    Repeat for all sheets on the list.
    Could be up to 85 sheets to edit.

    Sorry for the long post, but I wanted to be thorough. Thanks for any help!

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

    Re: Macro to copy from a template to worksheets from a list of worksheets

    Attaching a sample workbook enables others to work on your problem:

    To attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and click "manage attachments" to open the upload window.


    To add a file to a post

  3. #3
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    4

    Re: Macro to copy from a template to worksheets from a list of worksheets

    I've attached a sample workbook. The "291" worksheet is what the sheets currently look like. The "291 after date change" worksheet is what I'd like them to look like after the macro. Where the top calendar is moved down to replace the bottom calendar and then the top calendar replaced with the calendar from the "Calendar" sheet. The list of sheets to perform this task on is on the "Employees" tab.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    4

    Re: Macro to copy from a template to worksheets from a list of worksheets

    So I found some code and modified it to get some of what I need done. The New_Year macro will move the calendars down on all sheets from the list. Now I need to figure out how to copy the calendar template to each sheet using the same macro.

    Please see attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-17-2018
    Location
    Michigan
    MS-Off Ver
    2010
    Posts
    4

    Re: Macro to copy from a template to worksheets from a list of worksheets

    Solved this one myself! If anyone is interested in the code, let me know and I'll post it.

+ 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. create non-repeated worksheets (copy of template) with hyperlinks from main list
    By helpwanted222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2015, 05:48 AM
  2. [SOLVED] Problem with macro to copy then rename worksheets based on a list
    By Ellen 2Excel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2013, 01:06 PM
  3. [SOLVED] Create Multiple Worksheets from a template using the names in a list
    By gsemaan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-17-2012, 02:24 AM
  4. Replies: 2
    Last Post: 02-06-2012, 07:39 PM
  5. Parse list of data to template in different worksheets
    By pmhabo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-20-2010, 06:49 PM
  6. Copy Data into Template Worksheets
    By BLarche in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-05-2006, 10:27 AM
  7. Need macro to copy a list of named cells between worksheets
    By John in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-08-2006, 07:35 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