View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Conditional Seperation of Rows

Paul,
So (T2-T1)/30 should give you the number of 30 minute period between the 2
times ?
But then some of your values are not valid; 100, 200, 230

Or am I missing something ?

NickHK

"Paul Shoemaker" wrote in message
...
I have a particularly frustrating problem ... I have a column of values

like:

0
30
100
200
230
330

These are time stamps that correspond as follows 0 = 12:00am, 1 = 12:30am,
etc .

There are times missing in any given report (it's a sql pull) and i need

to
fill in the blanks. There are whole rows of data that are associated with
these time stamps. What I need to do is compare every two rows to see if
there are inconsistencies ... essentially it follows a difference of 30
between every row. In pseudo code I see it like this:

for loop (from first cell to last cell)
excel.range rngTop
excel.range rngBottom
does rngBottom - rngTop = 30?
if yes then move to the next cell down
if no then select the entire row and all subsequent rows to the end
then move the selection to one row below it
move down the column
repeat same action

Any ideas?

I'm using VSTO 2005 and C# as my preferred language. If you are more
comfortable with VB then that's fine, I'll attempt to translate. It is
really coming down to my lack of knowledge of the object model. Thank you

in
advance for any help you can give.

Paul