Hi there,
I a file with time (seconds), speed and headings. I wish to put a number in a column each time a new condition defined by me occurs. Currently I have the code below, which inserts 1,2,3 etc in a column each time a vehicle changes direction
Now I want to change it so that, it puts a marker every 30 seconds. I have seconds in the previous column 1,2,3,4 etc, so I want to put a marker at every multiple of 30. This is what I have so far
Could someone help me define the multiple of 30 piece of code.
Thank you
I a file with time (seconds), speed and headings. I wish to put a number in a column each time a new condition defined by me occurs. Currently I have the code below, which inserts 1,2,3 etc in a column each time a vehicle changes direction
Code:
Range("AL1").FormulaR1C1 = "conditions"
i = 1
Range("AL2").Select
do loop to check for direction change:
Do
If ActiveCell.Offset(0, -33).Text = "Change of heading" Then
ActiveCell.Value = i
i = i + 1
End If
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
Now I want to change it so that, it puts a marker every 30 seconds. I have seconds in the previous column 1,2,3,4 etc, so I want to put a marker at every multiple of 30. This is what I have so far
Code:
Range("AL1").FormulaR1C1 = "conditions"
i = 1
Range("AL2").Select
do loop to mark every 30 seconds:
Do
If ActiveCell.Offset(0, -1). = **a multiple of 30** Then
ActiveCell.Value = i
i = i + 1
End If
ActiveCell.Offset(1, 0).Select
Loop Until IsEmpty(ActiveCell.Offset(0, -1))
Could someone help me define the multiple of 30 piece of code.
Thank you