+ Reply to Thread
Results 1 to 19 of 19

capture live data at a specified time

  1. #1
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    capture live data at a specified time

    I will have many cols whose cells are being constantly updated live.

    I would like to be able to freeze/capture the data in the various cols at specified times.

    ie ... col F at 13:00, col G at 13:10 etc ..

    I would be grateful if anyone can help with that.

    Regards

    Paul

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: capture live data at a specified time

    You will need VBA for this, so I've moved your thread accordingly for better visibility to those who can help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: capture live data at a specified time

    Hi sherman51

    Not sure what you wanna do with the captured data but this should give you an idea...
    Code will copy info in Column F to Sheet2 at 13:10 every day
    in Workbook Module...
    Please Login or Register  to view this content.
    In std Module...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    Thanks very much for your help ...

    Could I just trouble you a little further to show how I would string the vba together to capture (copy) a multitude of times / cols ..

    ie, I would possibly be looking to capture the data around 52 times a day, for example from 8am to 9pm every 15 mins, so col F at 8am, then col G at 8:15am, then col H at 8:30am etc ..
    and I would be looking to copy the same cell from the data sheet to the destination sheet ie so F1 to F1 etc ..
    Thanks again
    Paul

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Put this in the Workbook module:
    Please Login or Register  to view this content.
    And this in a regular module:
    Please Login or Register  to view this content.
    It will kick off at 8am (so long as you've opened the workbook before that time) and will copy F1 on Sheet1 to F1 on Sheet2. It will then run again every 15 minutes, copying the next column then the next etc., until the 53rd run at 9pm.

    You can obviously tinker with interval times and number of iterations etc. but should point you in the right direction at least.

    See attached for a working version.

    PS. I've never had to do this before so I'm winging it and am sure someone will be along with a better way.

    BSB
    Attached Files Attached Files

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Here's a version set to start when you click the button on Sheet1 and run every 1 second so you can see it working in much quicker time.

    BSB
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    thank you BSB, that appears to work just great, just one other thing, i need to copy the whole column, I'm not sure how to modify ..
    thanks again
    Paul

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Change this line:
    Please Login or Register  to view this content.
    for this:
    Please Login or Register  to view this content.
    BSB

  9. #9
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    brilliant, thank you so much ...
    Happy New Year ..
    Paul

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Glad I could help.

    Don't forget to mark the thread as SOLVED if you're happy you have a working solution.

    Happy New Year to you too

    BSB

  11. #11
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    Apologies if this is the wrong thing to do, (as this thread is now solved) just an after thought really ...
    would it be possible to update "sheet 2" at 15 min intervals from 8:00 onwards (as this code indeed does) but from a single col on "sheet 1"
    ie "Sheet 1" col F is continually updating, could i then copy the col at 8:00 to "sheet 2" Col F, then at 8:15 copy the same col ("Sheet 1" F) to "Sheet 2" col G and so on ..
    Thanks
    Paul

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: capture live data at a specified time

    Not a problem - just mark the thread as unsolved (I've done this for you), otherwise it might not get looked at again.
    Last edited by AliGW; 01-03-2018 at 05:01 AM.

  13. #13
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Change this line:
    Please Login or Register  to view this content.
    To this:
    Please Login or Register  to view this content.
    BSB

  14. #14
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Actually, ignore the previous post. You want to paste just the values so replace the current TimePaste sub with this one:
    Please Login or Register  to view this content.
    BSB

  15. #15
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    thats brilliant, thanks once again ..
    Paul

  16. #16
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    No problem. Happy to help

    BSB

  17. #17
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    Hi, just discovered one small thing, wonder if it can be avoided ..
    when the data is copied from one sheet to another, the destination sheet is moved to the "paste" area and remains highlighted, this can be a little troublesome when working or viewing another area when new data is copied. is there a way to avoin this or maybe have the sheet "go home" after the transfer ?
    Works great otherwise though ... so still very usefull
    Cheers
    Paul

  18. #18
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: capture live data at a specified time

    Have a look at adding:
    Please Login or Register  to view this content.
    To the start of the sub and setting it to True at the end.

    Commuting at the moment so cannot test but when I'm home I'll log in and check.

    BSB

  19. #19
    Registered User
    Join Date
    08-26-2015
    Location
    Staffordshire UK
    MS-Off Ver
    2007
    Posts
    98

    Re: capture live data at a specified time

    once again, thank you very much .. works a treat ..
    Cheers
    Paul

+ 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] Capture real time data/DDE capture
    By rajre in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 01-07-2022, 05:14 AM
  2. Vb to force Dynamic charting values to update at same time as live data
    By Willow350 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2016, 10:18 PM
  3. Capture live changes to dde file metatrader forex
    By freak11 in forum Excel General
    Replies: 0
    Last Post: 06-12-2014, 02:59 PM
  4. excel live 60 min data real time
    By freak11 in forum Excel General
    Replies: 1
    Last Post: 06-08-2014, 08:20 PM
  5. how to capture /record live quote data
    By beebee in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-30-2013, 08:46 AM
  6. Replies: 0
    Last Post: 06-25-2012, 04:52 AM
  7. Capture Live Data and display value only in new cell
    By excelbet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-03-2012, 06:16 PM

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