+ Reply to Thread
Results 1 to 5 of 5

Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

  1. #1
    Registered User
    Join Date
    09-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    51

    Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

    Hi there,

    Thank you for your time.

    I am not sure if what I am after is possible, it a concept that I have been presented with as a solution for auditing purposes and KPI compliance.

    I currently have a workbook (daily log) where dispatchers enter in the time of an event and other details based on feedback from patrols. This Daily Log is in use 24/7.

    In order to encourage timely entry of data, and integrity of previously entered data, I would like to move rows of data from the Daily Log workbook and move the data to a 'Master' workbook every 4 hours, whilst the Daily Log is still open. The Master workbook is to be password protected and closed after the import of data.

    I have a Daily Log Workbook, that is kept for the current Month and Year entries (which by the end of the month is a minimum of 1000 rows of data and 100 columns of data, approx 4-5 MB in size). When the new month starts, then a new Daily Log for the next months events is created based on a Excel Template. I'd would like a new Master Log Workbook for each Month and year.

    Is it possible to use VBA to program such a schedule based on the time of the last 'TIME' entry of the previous row?

    I have searched the internet to see if I could find something similar that I could perhaps modify, but no matter how I have worded it ... i haven't been able to come up with anything, even by breaking down the tasks.

    I am open to perhaps any other solutions that would provide a similar outcome.

    If you need any further information, please don't hesitate to contact me.

    I really appreciate your time and possible solution.

    Kind regards,
    Shybutterfly

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

    Hi,

    I was asked a similar question by a client a couple of years ago and in the end we decided that Google Docs allied with Google sheets was the most robust solution.

    The Docs allowed different people to add data whenever they wanted and each entry is logged within a Sheets document - or if you prefer an Excel workbook which can be analysed in the normal way with either Sheets or Excel standard functionality.

    You may also find that you don't need to bother with creating a new log sheet when the month changes since you will have all the relevant dates/times in the Sheets document stored in the cloud and it would be easy to analyse by month with a Pivot Table or other functions.

    Since then I've used it for a few of these 'how do I capture data in real time' exercises. The big advantage is that it overcomes all the limitations of the Excel 'Shared Workbook' functionality.

    Although to be fair I don't know whether the shared functionality aspect of Excel has moved on with Excel 2016.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    51

    Re: Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

    Hi Richard,
    Thank you for your very quick response I really appreciate it.

    I sort o get the gist of what you are saying (in relation to the 'Cloud') and appreciate your suggestion.

    The bottom line is that only 1 person is working on the document at any given time (1 dispatcher), and by moving the data to a 'master' monthly log, and password protecting it, it stops the dispatcher from changing previously entered details - they have a KPI which states the data entry must be completed within a certain time (say 4 hours of being entered). If they haven't completed the details, they will need to contact the Supervisor and explain why they hadn't updated the details within the 4 hours. It is a method of monitoring if the dispatcher is meeting KPIs or not.

    Isn't VBA capable of scheduling a data export (completely moving the data from the daily log and moving it to the next available free row in a Master workbook)?

    Kind regards,
    ShyButterfly

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

    Hi,

    Yes that should be doable. From a process point of view is this how you expect the process to work.

    1. The daily log is opened and VBA records the date, time and the row number of the last entry as VBA variables
    2. Entries are added to the log.
    3. 4 hours after the time recorded in the VBA variable, all the records after the row number are Moved and added to a separate master workbook
    4. The VBA variables are reset
    5. Steps 2-4 repeated..........

    Questions.
    1. You say moved. Does that mean the records will be deleted from the log immediately the move has taken place? Or do you mean Copied?
    2. If you mean copied what is there to stop the dispatcher sorting the log and compromising the records transferred at the next 4 hour event?
    3. The VBA code will need to contain the password needed to open the Master workbook. The VB environment can be protected so that a password to get into the VB code would be necessary in order to discover the Master workbook password. But given that, wouldn't it be easier to have a password protected sheet in the log workbook that the dispatcher couldn't unhide or see?

  5. #5
    Registered User
    Join Date
    09-07-2012
    Location
    Australia
    MS-Off Ver
    Excel 365
    Posts
    51

    Re: Excel 2013 - Scheduling export of data from 1 workbook to another every 4 hours

    Thank you Richard, again, for your speedy response.

    I'll try to further clarify the process in response to the points and questions you've raised

    In response to your Questions:
    1. Actually, to err on the side of caution, I will revert back to my original idea of having the rows LOCKED (based on the 4 hour criteria) and then copied to the Master Log workbook - because if there is a break in the link to the Master (IT moving/renaming folders ) then there is a possibility of loosing data etc. It also allows the Dispatch to review events of his shift.
    2. I understand that the Code for the Master Log workbook will need to be contained in the Daily Log workbook. The developer tab will not be visible and the level of knowledge of excel is very basic and have no idea, so I don't believe a password to get into the VBA is necessary.
    3. The idea of copying the data into a separate workbook is because the file will get very large and previous experience has shown that Excel is likely at some point to corrupt the workbook once it gets past the 5-6MB size. Excel handles the file well under the 6MB. Another consideration is also, the larger the file, the likelihood that the file will start to lag in performance (become less responsive).

    Further clarification:
    1. The Daily Log is pretty much continuously open, and it is the Dispatcher who enters the time based on when a call comes through, this is not VBA generated.
    2. The Dispatcher completes the details of the call as information comes in and saves the open file, which remains open.
    3. The Dispatchers have strict instructions to not sort the file, which they have followed. (Password protection to prevent sorting, would that effect/conflict with the VBA code?)
    4. The structure of the sheet is that the new entry is added to the next line of empty row, working down the sheet. So it would need to lock and copy the data starting from row 2 and down to the period that meets the '4 hours' cut off.
    ** Just as an aside in case it has any bearing on the proposed process - there are sheet has multiple excel functions and formulas (VLookups, etc - non VBA), calculations of time
    differences from time of call, to dispatch, to on site and leaving site.

    I would be able to work out how to transfer the data, but the coding to setup the scheduling of the 4 hour criteria based on the Time (24hr clock) in column 'K' of the preceding row, I have not a clue how to code that.

    So in summary, we are not deleting the contents of the Daily Log file, but just locking the rows and copying it to a separate Master Log workbook (password protected)

    Is the information a little more clearer than my first attempt? I hope so

    Thank you again for your time
    Cheers,
    ShyButterfly

+ 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] Data Export Macro works in Excel 2013 but not Excel 2007
    By margentieri in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2016, 10:49 AM
  2. Buttons for Emailing, scheduling and sending reminders from Excel 2013
    By mattm11 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2014, 04:16 PM
  3. Replies: 0
    Last Post: 10-01-2014, 07:18 PM
  4. Scheduling Data Needed and Bid Hours Calculated for a certain date
    By smirk100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2013, 06:52 PM
  5. Replies: 7
    Last Post: 03-31-2013, 03:09 PM
  6. Auto scheduling a data export to a new worksheet
    By jaspindersingh83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-05-2013, 04:53 PM
  7. Excel Scheduling Tool Help Total Scheduled Hours
    By uhcord98 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-04-2010, 05:00 AM

Tags for this Thread

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