+ Reply to Thread
Results 1 to 3 of 3

Copy an ever changing value from one cell into another

  1. #1
    Registered User
    Join Date
    05-07-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    4

    Cool Copy an ever changing value from one cell into another

    Greetings, I am trying to copy a value which is constantly changing in one cell into another cell thereby creating a list or history. The worksheet is already updated constantly (sub second timeframe). I am trying to get this to occur at specific intervals, every 5 seconds. I have intermediate standard excel experience but not much experience with VBA. I have searched the threads and not found anything that addresses this specific problem. Any help or suggestions provided would be greatly appreciated. Thank you for your time.

    Anthony

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

    Re: Copy an ever changing value from one cell into another

    Hi Anthony

    Have a look at this link to see if it is of interest....It gives a formula and VBA solution.
    https://www.quora.com/How-can-I-reco...-point-in-time
    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!!!

  3. #3
    Registered User
    Join Date
    05-07-2017
    Location
    USA
    MS-Off Ver
    2016
    Posts
    4

    Re: Copy an ever changing value from one cell into another

    This is similar to what I want done from the link you have provided:

    ______________________________________________________________________________________________________________________________
    'These subs must go on the ThisWorkbook code pane. They won't work at all if installed anywhere else!
    Private Sub Workbook_Open()
    dNextTime = TimeSerial(9, 30, 0) 'Run the CaptureHeadlines sub at 9:30 AM
    dNextTime = Date + dNextTime + IIf(Now > (Date + dNextTime), 1, 0)
    Application.OnTime dNextTime, "CaptureHeadlines"
    End Sub

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.OnTime dNextTime, "CaptureHeadlines", Schedule:=False 'Cancel the CaptureHeadlines scheduled run
    End Sub
    ______________________________________________________________________________________________________________________________
    'This code must go in a regular module sheet. It will not work at all if installed anywhere else! Make sure the Public statement is above any subs or functions.
    Public dNextTime As Double

    Sub CaptureHeadlines()
    Worksheets("Sheet2").Range("A1").Value = Worksheets("Sheet1").Range("A1").Value
    dNextTime = dNextTime + 1
    Application.OnTime dNextTime, "CaptureHeadlines"
    End Sub
    ______________________________________________________________________________________________________________________________

    However, I want the data copied every 5 seconds, ALL DAY not just once a day at a specific time. Ideally it would be best to be able to plug in start and stop times.

+ 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. Copy formulas but changing only the cell values
    By thedunna in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2014, 04:49 PM
  2. Copy changing DATE value from same cell
    By AudriusB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2013, 09:40 AM
  3. [SOLVED] How to copy formula's from a Relative cell without changing the cell references
    By mowens74 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-03-2013, 04:42 AM
  4. [SOLVED] copy/paste a cell formula without changing it
    By Lethe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2012, 08:15 PM
  5. [SOLVED] Copy Cell Value wich is changing every day to cell in another sheet
    By stanley in forum Excel General
    Replies: 12
    Last Post: 04-01-2012, 03:28 PM
  6. Replies: 6
    Last Post: 10-08-2011, 09:27 AM
  7. Copy value and paste in cell using changing match value
    By scorro1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2010, 11:18 AM
  8. Copy absolute formula, without changing every cell
    By alisapooh in forum Excel General
    Replies: 3
    Last Post: 09-24-2009, 11:12 AM

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