+ Reply to Thread
Results 1 to 9 of 9

recording / graphing real-time variable cell values

  1. #1
    Registered User
    Join Date
    04-16-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    5

    recording / graphing real-time variable cell values

    Hi everyone, here's what might be a bit of a challenge for you. Or maybe not so much.

    I have live market data coming in to excel through DDE, my question is how do I graph this data since the cell is constantly updating?

    Thank you in advance, from an excel newbie

    Adam

  2. #2
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: recording / graphing real-time variable cell values

    Hello Adam

    Have a look at John Peltiers content on dynamic charts here: http://peltiertech.com/Excel/Charts/ChartIndex.html#D
    Regards

    Jon (Excel 2003, 2007, 2010, 2013)

  3. #3
    Registered User
    Join Date
    04-16-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: recording / graphing real-time variable cell values

    Thank you, I see that all these charts involve a range, so I guess then my question would be how do I record the changing values of a single cell into a row that can then be charted?

  4. #4
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: recording / graphing real-time variable cell values

    Hello again Adam

    How is the data refreshed? Do you manually trigger the refresh or do you have some code to fetch it? If you provide a little more info in terms of where the data sits (ranges and sheet name) then perhaps I can construct a little macro for you to maintain a history.

    How often do you refresh the data and how much history do you need for your charts?

  5. #5
    Registered User
    Join Date
    04-16-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: recording / graphing real-time variable cell values



    The data comes from 3rd party software & is refreshed automatically every 250 milliseconds

    So the cell value is constantly updating, but i wonder if I can probe the cell every x number of seconds or milliseconds, record the value in a separate column, & then chart it. I would like to capture all data but maybe display the last 1000 data points on the chart.

    Your help is immensely appreciated

  6. #6
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: recording / graphing real-time variable cell values

    Quote Originally Posted by Adamo View Post


    The data comes from 3rd party software & is refreshed automatically every 250 milliseconds
    And all this is done in Excel? I think a macro to trigger every few seconds is going to cause some problems. Effectively it means taking the data at that point and loading it to an append table. Any macro I supply is going to freeze your Excel for a second or so and therefore make it nigh on impossible to do any actual work with the application. I was expecting every hour or so, or once a day. Working with seconds is another story (for me at least)...

  7. #7
    Registered User
    Join Date
    04-16-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: recording / graphing real-time variable cell values

    Fair enough, how would the macro look like if we assumed once every hour?

  8. #8
    Forum Contributor
    Join Date
    04-16-2009
    Location
    Stellenbosch, South Africa
    MS-Off Ver
    Excel 2003; Excel 2007; Excel 2010; Excel 2013
    Posts
    136

    Re: recording / graphing real-time variable cell values

    Hi Adam

    It would depend on the construct of the query table (the ranges and how the data is laied out e.g. columnular or row oriented). I would also need to know the names of the sheets. What constritutes 1000 data points? Rows? Here is an example of how I would do it to trigger say every 15 seconds:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-16-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: recording / graphing real-time variable cell values

    thank you very much, i will try this code when I get home tonight!

+ 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