Need help with "Find Method"
I am using the find method to search cells in a predefined Range I have set up.
The problem is that the find method never includes the first row in the
predefined range for example...
Sub Test()
Dim MyRange as range
Dim c as range
Set MyRange = Worksheets("Sheet1").Range("A2:A10")
With MyRange
Set c = .Find(123, LookIn:=xlValues)
If c Not Nothing Then
.Rows(c.Row).Interior.colorindex = 4
end if
End With
End Sub
If the only cell in Sheet1 That has the value 123 in it is A2 then my macro
does not find it ???
Is there a way to include the first cel in MyRange as part of the search ??
Dan.
|