Sub finddate()
Dim foundRng As Range
Sheets("download").Activate
Set foundRng = Range("g2:g9").Find(Sheets("schedule").Range("b2").Value)
If Not foundRng Is Nothing Then
MsgBox "Found at " & foundRng.Address
End If
End sub
I am having trouble while comparing a time field when all cells are custom formatted as time 13:30
For example B2 has 17:05, cell g2 in range of g2:g9 also has 17:05 but cannot get a find. 'When I copy and paste value from g2 to b2 here is also no find
I ran a test using numbers instead of times with format as numbers and entered a 1, 2 and 3 in the range and a find value of 1 in b2 also formatted as number and it works. Then changed 1, 2 & 3 to 1.00, 2.00 and 3.00 and the find value to 1.00 and did not work.
What am I doing wrong?
Dim foundRng As Range
Sheets("download").Activate
Set foundRng = Range("g2:g9").Find(Sheets("schedule").Range("b2").Value)
If Not foundRng Is Nothing Then
MsgBox "Found at " & foundRng.Address
End If
End sub
I am having trouble while comparing a time field when all cells are custom formatted as time 13:30
For example B2 has 17:05, cell g2 in range of g2:g9 also has 17:05 but cannot get a find. 'When I copy and paste value from g2 to b2 here is also no find
I ran a test using numbers instead of times with format as numbers and entered a 1, 2 and 3 in the range and a find value of 1 in b2 also formatted as number and it works. Then changed 1, 2 & 3 to 1.00, 2.00 and 3.00 and the find value to 1.00 and did not work.
What am I doing wrong?