roka001
Board Regular
- Joined
- Aug 6, 2007
- Messages
- 72
Hello!
I get reports that are stamped with the time when a number of instances have occurred.
The problem is that these reports are unsorted.
Example:
02:05 23,
05:34 43,
06:54 43,
07:13 54,
and so on.
I manage this by adjusting the cells so that they match a range from 00:00 to 23:00 with 1 minute range.
The timestamp is in column B and the value is in column C. The scale is in column A.
I use this code:
range("b1").select
do until activecell.offset(0,-1) = "" '
if activecell = activecell.offset(0,-1) then
activecell.offset(1,0).select
else
ActiveCell.Resize(1, 2).Insert xlShiftDown
end if
loop
Now the question ... Suppose that these reports have a few thousand rows. When I run my macro, it takes a while for it to compleat.
I wonder if there is no better way to synchronize the cells with each other.
I get reports that are stamped with the time when a number of instances have occurred.
The problem is that these reports are unsorted.
Example:
02:05 23,
05:34 43,
06:54 43,
07:13 54,
and so on.
I manage this by adjusting the cells so that they match a range from 00:00 to 23:00 with 1 minute range.
The timestamp is in column B and the value is in column C. The scale is in column A.
I use this code:
range("b1").select
do until activecell.offset(0,-1) = "" '
if activecell = activecell.offset(0,-1) then
activecell.offset(1,0).select
else
ActiveCell.Resize(1, 2).Insert xlShiftDown
end if
loop
Now the question ... Suppose that these reports have a few thousand rows. When I run my macro, it takes a while for it to compleat.
I wonder if there is no better way to synchronize the cells with each other.