+ Reply to Thread
Results 1 to 8 of 8

Exporting data weekly

  1. #1
    Registered User
    Join Date
    05-26-2014
    Posts
    9

    Exporting data weekly

    Hey guys,
    Got another sweet request, Iam needing help with a macro to push data from my master workbook to several other subordinate workbooks.
    I need to be able to export a row if the inspection dates are within 30 days of the due date. This would happen with both the TI due date and the NTI due date. Attached are the master and the subordinate workbooks.

    thanks heaps in advance...
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-26-2014
    Posts
    9

    Re: Exporting data weekly

    Anybody? kinda need some sorta help here...

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

    Re: Exporting data weekly

    Hi Supermanjohnno,

    Try the following macro which may need a few small adjustments to suit your needs.
    Please let me know if you need help changing things. I will be glad to change anything you don't like, or to add enhancements that you think of.

    I had concerns about exporting an item more than once, so I used Column 'U" (Comments Column) in the 'Master Workbook' to store the date and time the data was exported. If a cell in a row contains 'Exported' in Column 'U', that item will NOT be exported to the 'subordinate' workbook.

    Both workbooks are automatically saved. I did this so the 'Exported' in Column 'U' of the Master Workbook would sync with the 'new data' in the 'Subordinate' workbook.

    Lewis

    Ordinary Code module such as 'Module1':
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-26-2014
    Posts
    9

    Re: Exporting data weekly

    Sorry, this was the place i was going to post the files.

    IAW my email LZMETZGER
    Attached Files Attached Files

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

    Re: Exporting data weekly

    Hi Johnno,

    Even with a couple of wrong turns, it was easier than I thought implementing what you wanted. I get the names of the workbooks from the 'Custodian' column.

    I couldn't post the code because it was too big. See the attached file.

    To install on your computer:
    a. Go into VBA Editor.
    b. Open my file.
    c. Export module 'ModExportData2'
    d. Close my file.
    e. Open your file
    f. Delete Module2 (my previous code). If this is NOT DONE, the Excel file could FREEZE.
    g. Import module 'ModExportData2'
    h. Save your file.

    I made the following assumptions, which I hope are true:
    a. Subordinate Workbooks are all in the Same Folder as the Master Workbook.
    b. Extension for Subordinate Workbooks is '.xls'
    c. All Subordinate Workbooks remain open on Completion.
    d. Program WILL NOT RUN unless all Subordinate Workbooks are AVAILABLE.
    e. BLANK custodian name is an ERROR.

    As always, let me know if you need any changes, and/or you have any problems.

    Lewis
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-26-2014
    Posts
    9

    Re: Exporting data weekly

    Hey lewis,
    Basicly what I wanted to do is export the info out from the master workbook into the rhq, wksp, asqn, bsqn, lst and wsig work books. Obviously you would need to enter some dates to make sure the correct details are exported. If you check the code in the master workbook you will see that it is for the TI dates and NTI dates. I really appreciate your help.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-26-2014
    Posts
    9

    Re: Exporting data weekly

    Lewis,

    These are the other 2..

    Once again, thankyou so much, if I could buy you beer, I would...

    Cheers,
    Johnno
    Attached Files Attached Files

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

    Re: Exporting data weekly

    Hi Johnno,

    I noticed that your file structure is slightly different from the original file. I added Column 'V' in the 'Master' to indicate when the data was put in the subordinate workbooks (column 'U' was used for the files in your original post'. I only put data in the subordinate workbooks for the same columns that were used in your original post. If this is a problem, let me know what needs adding if you can't do it yourself. This is the code where columns can be added or deleted as needed:
    Please Login or Register  to view this content.
    Complete Code follows (less helper functions). See the attached .bas file in the zip fie for the complete code that can be imported into your file.
    Please Login or Register  to view this content.
    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. [SOLVED] Formula to convert monthly data to weekly data
    By FSmit in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-15-2014, 09:12 AM
  2. [SOLVED] Copy Data from different sheets weekly into a master list with data of the whole year
    By ec4excel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-12-2014, 10:37 AM
  3. Replies: 1
    Last Post: 03-21-2013, 10:45 PM
  4. Replies: 2
    Last Post: 02-03-2012, 02:58 AM
  5. Replies: 1
    Last Post: 04-17-2009, 04:57 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