Code:
For i = 0 To ComparisonDataGrid.RowCount - 1
If foundvalue = 0 Then
If tREF >= Val(ComparisonDataGrid.Rows(i).Cells(0).Value) Then
t1 = ComparisonDataGrid.Rows(i).Cells(0).Value
t2 = ComparisonDataGrid.Rows(i + 1).Cells(0).Value
foundvalue = 1
End If
End If
Next
I am doing this with a nasty virus (bodily not computer) and am probably missing something simple, please bear with me? :)
Thanks, ryan