Creating a data log of changing data?

fishoutofwater

New Member
Joined
Jul 20, 2011
Messages
38
This is really over my head. I googled and I am finding ways to run a timer, but my VBA skills are just too weak to make sense of it. Nevertheless, I am desperate to add this functionality to my spreadsheet. Hoping you amazing folks can help! Thx!

I have live data streaming into my excel sheet titled "TdBd_SIMP_5m"
On this sheet, I have data in cells P4 and p5 that are constantly changing based on the streaming data.
On "Sheet2" in Cell A1 I have a start time (local to my own computer's time)
On "Sheet2" in Cell B1 I have an end time (local to my own computer time)
On "Sheet2" in Cell C1 I have a frequency to log data # (in minutes)

Starting at the "Start Time" and Ending at the "End Time" I want the VBA code to copy/paste the data from P4 and P5 and append it to Sheet2, starting in Cell A3 (for P4) and B3 (for the P5 data) every x minutes (as per the frequency in C2.)

In other words, I want to create a log of the P4 and P5 data, every x minutes, between the start time and end time. Thus, if the start time if 8am, and the end time is 9am, and the frequency is 15 (ie: 15 minutes) I want there Sheet2 to have 4 lines of data (a3:b6) showing the 4 recorded values of p4 and p5. Also, I want the log to append to the next availible empty line, so the log can simply continue day after day from the last recorded data.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,215,644
Messages
6,125,991
Members
449,278
Latest member
MOMOBI

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top