+ Reply to Thread
Results 1 to 5 of 5

Macro to create new worksheet from the current worksheet, with additional changes

  1. #1
    Registered User
    Join Date
    10-27-2013
    Location
    Bunbury, Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    3

    Macro to create new worksheet from the current worksheet, with additional changes

    Hi,

    I have a workbook that is updated manually daily, and I was hoping that a macro could be created to save some time!! The workbook is a running list of current jobs in a workshop, with each day separated into a different worksheet. Upon pressing the macro button ("New Worksheet" as an example) I would like the following to occur:

    1. A new work sheet is created and renamed in the ddmmyy format
    2. Data from the previous day (previous worksheet) is copied into that new worksheet
    3. If the item was despatched (="YES") on the previous day it is not copied into the new worksheet
    4. The index/match formulas for the workbook are updated so that they always reference the new worksheet and the previous worksheet

    Here is a copy of the workbook Jobs.xlsm

    Hopefully someone can help with this --- Thankyou
    Steve

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to create new worksheet from the current worksheet, with additional changes

    Steve,

    Your question was well written, and you have an excellent spreadsheet design.

    Try the attached worksheet (written and tested in Excel 2003). It should work
    in your version. I think it does all the things you ask plus:

    a. I changed the 'ReOrder' macro to automatically work for the 'Active' Worksheet.

    b. It has a button that will create a backup file for you.

    c. It keeps the formulas in column 'N' for the last 3 working days only.
    For the other days, the formulas in column 'N' are converted to numbers.
    It scares me when there are a lot of forward references. It also allows you
    to remove days no longer in use.

    d. I set the 'ZOOM' to 88% so all the data could be displayed on my screen.

    e. The Workbook is automatically saved after the 'new day' is created.


    Please double check to make sure the following items work properly before you
    use it in real life:
    a. Despatched items
    b. Calculation of hours in column N.

    Lewis
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-27-2013
    Location
    Bunbury, Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Macro to create new worksheet from the current worksheet, with additional changes

    Hi Lewis,

    Thanks for that. I have had a play with the workbook and it seems to work well. Obviously I can only open one new sheet each day, as it is based on the date, but from what I can see it does everything that I need. Over the next week I'll have a better indication, but I really appreciate your help.

    Thanks mate,
    Steve

  4. #4
    Registered User
    Join Date
    10-27-2013
    Location
    Bunbury, Western Australia
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Macro to create new worksheet from the current worksheet, with additional changes

    I have been entering some test data into the workbook, periodically over the last two weeks, and it appears to always be referencing worksheet 281013 in the "match" formula in column N (running hours tally). Is it possible for the formula to reference the previous worksheet each time (in the case of 131113 we would reference 121113 for the match, whereas 11113 would reference 061113 for that match)?

    Jobs List.xls

    Steve

  5. #5
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Macro to create new worksheet from the current worksheet, with additional changes

    Steve,

    I apologize for the error in the previous file I uploaded, caused by poor testing on my part. Try this file which should correct the problem. Be careful when cutting and pasting Sheets between Workbooks. Sometimes the BUTTONS reference an OLD FILE instead of the current file.

    Please let me know if there are any other issues or the same issue.

    Lewis
    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)

Similar Threads

  1. How to create a macro which will fill a 'table' worksheet from another 'form' worksheet
    By tomgnihtemos in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-18-2013, 01:13 AM
  2. Create list in new worksheet with current info after multiple filtering
    By HERJARI in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-18-2013, 10:21 PM
  3. [SOLVED] Macro to create new worksheet from template and link to it from current cell?
    By chemoul in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 08-15-2012, 07:00 PM
  4. Replies: 1
    Last Post: 03-11-2011, 07:26 PM
  5. Macro to create new worksheet with values from existing worksheet
    By SamBam in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-18-2011, 05:33 AM

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