Hello all,

I am stumped on the best way to handle this situation. I'll explain it
the best I can.

I have a macro that reads data from some log files. Every day at 12AM,
a new log file is created that will contain all of the data for that
day, from 12AM to 11:59:59PM.

This log file contains lines of data. Each line has a sequential
number. The numbering resets itself to 1 at the start of the
production day. This can be anywhere between 5AM and 6AM.

So, to get all of the numbers for one full production day, you have to
read data from two different log files. For instance, if you wanted
all of the data that relates to yesterday's production day, you would
need to start at yesterday's number 1 entry (which happened around 6AM
or so) and include the rest of the data after that entry, and you would
everything that happened before today's number 1 entry, not including
today's number one entry.

It is important to note that the times in which the numbers roll back
to number 1 to start the day are random.

Currently, I load the data file into Excel and do a filter based on
time. This is close, but doesn't always work, for the reasons stated
above.

What I really need is to find a way to say, "In yesterday's file, find
the #1 entry and delete everything that happened before it. Then, in
today's file, find the #1 entry and delete it, and everything that
happened after it."

I cannot seem to make this work. Can anyone help point me into the
right direction?

If you need more info, just ask.

Here is the data I have available:

Date / Time (military style) / Sequence number / Serial number
/ Product Type

Thanks!
Tim