MrTerry
04-27-2008, 06:57 AM
I have a directory containing x number of text files. The lines in each text file look something like this:
Event4, 270408, 11:39
Event9, 270408, 11:55
Event1, 270408, 12:01
Event3, 270408, 12:09
Event6, 270408, 12:11
Event6, 270408, 12:22
Event2, 270408, 12:25
Event7, 270408, 12:26
Event1, 270408, 12:29
Event8, 270408, 12:35
...Each line refers to an event and when that event occurred.
I need to ignore all the lines which fall outside a given time period, i.e. Start Date/Time and End Date/Time.
For the events which fall within this period, I need to check the time difference between one line and the next is less than a
given timeout.
i.e. If I have several events which occur within, say, 10 minutes of each other, I need to record the sequence of events, the
time differences between each event and also the diff in time from the first event to the last. For example, if...
Start Date/Time = 270408 12:00
Start Date/Time = 270408 12:30
The output needs to look like this...
Event1, Event3, Event6, 00:08, 00:02, 00:10
Event6, Event2, Event7, Event1, 00:03, 00:01, 00:03, 00:07
I want to run this from Excel 2003 by the way.
I hope someone understands the idea(!). Being a bit of a novice I could really use some help with this... any advice would be
much appreciated!
Thanks
Event4, 270408, 11:39
Event9, 270408, 11:55
Event1, 270408, 12:01
Event3, 270408, 12:09
Event6, 270408, 12:11
Event6, 270408, 12:22
Event2, 270408, 12:25
Event7, 270408, 12:26
Event1, 270408, 12:29
Event8, 270408, 12:35
...Each line refers to an event and when that event occurred.
I need to ignore all the lines which fall outside a given time period, i.e. Start Date/Time and End Date/Time.
For the events which fall within this period, I need to check the time difference between one line and the next is less than a
given timeout.
i.e. If I have several events which occur within, say, 10 minutes of each other, I need to record the sequence of events, the
time differences between each event and also the diff in time from the first event to the last. For example, if...
Start Date/Time = 270408 12:00
Start Date/Time = 270408 12:30
The output needs to look like this...
Event1, Event3, Event6, 00:08, 00:02, 00:10
Event6, Event2, Event7, Event1, 00:03, 00:01, 00:03, 00:07
I want to run this from Excel 2003 by the way.
I hope someone understands the idea(!). Being a bit of a novice I could really use some help with this... any advice would be
much appreciated!
Thanks