Hi,
I've downloaded data for a US equities symbol.
It's a sheet containing 1 minute data for a stock that have been trading the last 6 months.
It has 1 row per minute from 9:30 to 16:00 every trading day (monday to friday, except holidays) for the last 5-6months
It has about 30000rows:
from
A1: 09/27/11 B1: 16:00
A2: 09/27/11 B2: 15:59
A3: 09/27/11 B3: 15:58
...
A29703: 04/06/11 B29703: 9:32
A29704: 04/06/11 B29704: 9:31
A29705: 04/06/11 B29705: 9:30
but sometimes, data jumps for 2-3-or plus minutes instead of 1 minute
for exemple:
jumping from
A10001: 06/20/11 B10001: 11:44
to
A10002: 06/20/11 B10002: 11:42
or
A10201: 06/22/11 B10201: 13:27
to
A10202: 06/22/11 B10202: 13:22
What I would like is to create a VBA procedure that would fill the lines that have data jumping for more than 1 min in that trading period (from 9:30 to 16:00)
I don't know where to start to...
maybe something that will find every gap that have more than 1 minute (in column B)in them, when there is a gap of 1 minute or more (beside the timeframe of 9:30 to 16:00) them insert a new line right in between and copy the exact data from the row below and change the cell in column B by adding 1min.
Does something knows a easy way to program that?
It would be really helpful!
thanks
I've downloaded data for a US equities symbol.
It's a sheet containing 1 minute data for a stock that have been trading the last 6 months.
It has 1 row per minute from 9:30 to 16:00 every trading day (monday to friday, except holidays) for the last 5-6months
It has about 30000rows:
from
A1: 09/27/11 B1: 16:00
A2: 09/27/11 B2: 15:59
A3: 09/27/11 B3: 15:58
...
A29703: 04/06/11 B29703: 9:32
A29704: 04/06/11 B29704: 9:31
A29705: 04/06/11 B29705: 9:30
but sometimes, data jumps for 2-3-or plus minutes instead of 1 minute
for exemple:
jumping from
A10001: 06/20/11 B10001: 11:44
to
A10002: 06/20/11 B10002: 11:42
or
A10201: 06/22/11 B10201: 13:27
to
A10202: 06/22/11 B10202: 13:22
What I would like is to create a VBA procedure that would fill the lines that have data jumping for more than 1 min in that trading period (from 9:30 to 16:00)
I don't know where to start to...
maybe something that will find every gap that have more than 1 minute (in column B)in them, when there is a gap of 1 minute or more (beside the timeframe of 9:30 to 16:00) them insert a new line right in between and copy the exact data from the row below and change the cell in column B by adding 1min.
Does something knows a easy way to program that?
It would be really helpful!
thanks