Это похоже на этот вопрос здесь , где я дал аналогичный ответ. Вы можете попробовать это, хотя это предполагает, что ваше время указано в 24-часовом формате, и предполагается, что вы хотите удалить только эту конкретную ячейку, а не всю строку.
Sub TimeDelete()
'Declare your variables
Dim timeRng As Range, early As Long, late As Long, lrow As Long
'Finds the last row with a time in it in Column F
lrow = ThisWorkbook.Worksheets("Sheet1").Cells(Rows.Count, 6).End(xlUp).Row
'Define the times you want to compare against
early = "02:00:00"
late = "10:00:00"
'Specifies the range the times are in
Set timeRng = ThisWorkbook.Worksheets("Sheet1").Range(Cells(1,6), Cells(lrow,6))
'Use a For loop to check each value in the range
For Each Cell In timeRng.Cells
If TimeValue(Cell.Value) >= TimeValue(early) And TimeValue(Cell.Value) <= TimeValue(late) Then
Cell.Delete Shift:=xlToLeft 'Deletes cell if it meets the criteria and shifts remaining cells in the row to the left.
End If
Next Cell
End Sub