+ Reply to Thread
Results 1 to 6 of 6

Auto update dataset

  1. #1
    Registered User
    Join Date
    03-30-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Auto update dataset

    Hi I am new excel and still trying to establish which of the many funtions would be best for the following requirments.

    I am looking for away to dynamically update a data range with a limit of 30 records.

    e.g Cell A1 has a new value entered in to it every 1 second.

    Lets say data range to be stored from C1 to C30.

    Everytime the data is entered in A1 it adds the value to C1, with the value in C1 moving to C2, value in C2 moving to C3 etc up to C30.

    After C30 the data is deleted hence - only the previous 30 secs of data is shown at one time.


    Hope you can help!!!!

  2. #2
    Registered User
    Join Date
    03-24-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Auto update dataset

    Do you want the macro to be populating the cell A1 in your example? Is the 1 second interval exactly what you're looking for? Where will the macro be pulling the A1 info from?

    I know that most of what you're doing is doable, but I just need a bit more info to give an answer.
    Oh you wanted the elegant solution? Sorry, that's extra!

  3. #3
    Registered User
    Join Date
    03-30-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Auto update dataset

    hi bitterenemy,

    A1 will be pulling the data from anothersheet which is dynamically linked to a live prices server.

    So I just need to record the value in A1 every 1 second (thats how often it updates) into a data range that displays the last 30 seconds worth of data.....

    hope that makes it clearer???

  4. #4
    Registered User
    Join Date
    03-24-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Auto update dataset

    This might help, except I can see how it might be hard to break since your information is being updated at small intervals. Put this code in the worksheet it will be called from. The worksheet_change event runs automatically whenever anything changes in your worksheet.

    Please Login or Register  to view this content.
    You may want to make a macro with a keyboard shortcut which will turn on and off application events so you can break this while it's running. Something like...

    Please Login or Register  to view this content.
    (I did not test the above code...) You could put this on a keyboard shortcut so you can stop this from running if you need to.

    Let me know if this works.

  5. #5
    Registered User
    Join Date
    03-24-2009
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Auto update dataset

    Something occurred to me... Does cell A1 automatically update? If it does not, you will need to use a timer function.

  6. #6
    Registered User
    Join Date
    03-30-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Auto update dataset

    Hi

    Thanks for your help.

    Seems promising just playing about with it. Your right do need a timer function of somesort will look into it.

+ 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