Hi!
I have a LOG sheet with a B column which contains different timestamps in format (hh:mm:ss). I am trying to find and select the time that is entered in "General" sheet in the cell B2.
I accomplished this with following code, which works fine most of the time.
But when startTime is somewhere in-between 13:59:14 and 14:00:00, instead of selecting the cell with time 14:00:00 it selects the cell with time 12:00:00
I just can't figure it out why it works for most of the times and not for that range (13:59:14 - 14:00:00)
I would really appreciate help on the matter.
I have a LOG sheet with a B column which contains different timestamps in format (hh:mm:ss). I am trying to find and select the time that is entered in "General" sheet in the cell B2.
I accomplished this with following code, which works fine most of the time.
But when startTime is somewhere in-between 13:59:14 and 14:00:00, instead of selecting the cell with time 14:00:00 it selects the cell with time 12:00:00
I just can't figure it out why it works for most of the times and not for that range (13:59:14 - 14:00:00)
I would really appreciate help on the matter.
VBA Code:
Sub TestFindFunction()
Dim startTime As Date
Dim B As Range
startTime = Sheets("General").Range("B2")
Set B = Range("B:B")
Set B = B.Find(what:=startTime)
B.Select
End Sub