J
J.W. Aldridge
This code works only if there is a 00:30 time given.
I need to search for the value that is greater than 00:30.
List of times may or may not include 00:30 exactly, but at the point
where it is greater than 00:30, I want to insert a line.
Possible Example:
00:28:00
00:29:02
00:31:01
00:32:06
The line inserted would be between 00:29:02 and 00:31:01.
Sub InsRow()
Dim LR As Long, i As Long
LR = Range("F" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If Range("F" & i).Text Like "*00:30*" Then
Rows(i + 1).Insert
Exit For
End If
Next i
End Sub
I need to search for the value that is greater than 00:30.
List of times may or may not include 00:30 exactly, but at the point
where it is greater than 00:30, I want to insert a line.
Possible Example:
00:28:00
00:29:02
00:31:01
00:32:06
The line inserted would be between 00:29:02 and 00:31:01.
Sub InsRow()
Dim LR As Long, i As Long
LR = Range("F" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If Range("F" & i).Text Like "*00:30*" Then
Rows(i + 1).Insert
Exit For
End If
Next i
End Sub