+ Reply to Thread
Results 1 to 13 of 13

Copy a live updating value every 5 minutes and paste it in a new cell

  1. #1
    Registered User
    Join Date
    10-13-2015
    Location
    Hyderabad, India
    MS-Off Ver
    2007
    Posts
    10

    Copy a live updating value every 5 minutes and paste it in a new cell

    Hi,

    I am not much into programming and need help...

    I have a value in the cell S1 which is a live value from a DDE Link. It keeps on changing...I need to copy that every 5 minutes and paste it in column T. After every 5 minutes the value in S1 has to be pasted in the column T in sequence. I also need a time stamp to be displayed in column "U" adjacent to column T. Every 5 Minutes, as and when a new value is copied in Column T, the time at which it is copied has to be displayed in the adjacent cell in the column "U". Can anyone help me with the code for this....


    Any help is highly appreciated...

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Run Log_Start to start the timer and Log_Stop to stop it.
    Change "Sheet1" to suit.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-14-2019
    Location
    Bangalore, India
    MS-Off Ver
    2008
    Posts
    8

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Hello. What would the be the code for a table. Like, a table from A1 x L12 gets live data every 2 minutes. So i would like the new table to get copied below the old one every 5 minutes.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Quote Originally Posted by AkashG View Post
    Hello. What would the be the code for a table. Like, a table from A1 x L12 gets live data every 2 minutes. So i would like the new table to get copied below the old one every 5 minutes.
    Run Log_Start to start the timer and Log_Stop to stop it.
    Change "Sheet1" to suit.

    Please Login or Register  to view this content.
    Also, paste the code below in the ThisWorkbook code module to insure the application terminates the OnTime event when the workbook is closed.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    12-14-2019
    Location
    Bangalore, India
    MS-Off Ver
    2008
    Posts
    8

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Hey! This worked perfectly! But i would like to copy the data to a new sheet!

    As in, the live tables updates in sheet 2, i would like to copy the table every 5 minutes one below the other in sheet 1!

  6. #6
    Registered User
    Join Date
    12-14-2019
    Location
    Bangalore, India
    MS-Off Ver
    2008
    Posts
    8

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Hello! I have attached herein the excel sheet! The Sheet "NIFTY OI" gets updated every 2 mins from the linked webpage! So every 2 mins i get fresh data! Now in this sheet, the table B45 x V 56 is what i need to be copied and pasted one below the other every minutes in sheet "NIFTY" starting from Row 16 onwards.

    Am really grateful for your help & really appreciate it.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-14-2019
    Location
    Bangalore, India
    MS-Off Ver
    2008
    Posts
    8

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Thank you! Worked perfectly, but a small hiccup! Getting the error " Runtime error 9", Subscript out of range

    I checked it up, this error arises when multiple excel sheets are open otherwise it works just fine
    Last edited by AkashG; 02-12-2020 at 05:25 AM.

  9. #9
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    04-28-2020
    Location
    India
    MS-Off Ver
    2019
    Posts
    2

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    AlphaFrog, this is really really useful for me. Can I ask if it's possible to have this timestamp on every row and not just on the first row? That would be super helpful.

  11. #11
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    Quote Originally Posted by dharma0 View Post
    AlphaFrog, this is really really useful for me. Can I ask if it's possible to have this timestamp on every row and not just on the first row? That would be super helpful.
    Change the 12 to the number of rows copied.
    Please Login or Register  to view this content.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Copy a live updating value every 5 minutes and paste it in a new cell

    This really should be in a new thread
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  13. #13
    Registered User
    Join Date
    04-28-2020
    Location
    India
    MS-Off Ver
    2019
    Posts
    2

    Talking Re: Copy a live updating value every 5 minutes and paste it in a new cell

    AlhpaFrog, thanks a lot. Made my day!

+ 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. Updating Copy/Paste
    By kwrigh6 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2015, 09:27 AM
  2. Live-updating Transposed Sheet
    By jsf1212 in forum Excel General
    Replies: 1
    Last Post: 04-06-2015, 06:17 PM
  3. Copy And Paste Cells automatically every x minutes
    By izzanaf in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2014, 12:51 PM
  4. Need to pull data from a live website after every thirty minutes (www.dsebd.org)
    By srabontheboss in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-13-2014, 10:47 AM
  5. VBA to find minutes picker for an employee and copy and paste it to main sheet
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2013, 05:20 AM
  6. Live updating A csv file from another worksheet
    By vivekchha in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-03-2011, 09:39 AM
  7. Live updating spreadsheet
    By cgxxxx in forum Excel General
    Replies: 0
    Last Post: 11-11-2009, 07:17 PM

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