I am trying to find a string in a row and then select the found cell. For this I have the following part of code:
currentRelease = Worksheets("Summary").Cells(5, "I").Value
Set myrange = Worksheets("Summary").Rows(15)
If Not myrange.Find(currentRelease, lookat:=xlValues) Is Nothing Then
Set releaseFound = myrange.Find(currentRelease, lookat:=xlValues) 'this row gets executed
releaseFound.Select
End If
I am not getting any error, but when debugging no cell gets selected and I see that the releaseFound
is returning Nothing
although the Set releaseFound...
row of this code gets executed, so the If
check has been actually positive? What could be the reason for this?
I tried to use the Find
feature on the sheet, outside of VBA, and the value is really found where I am searching for it...