Question

I need to make a selection from cell "A8" to a cell that contains the word "endofsample". That word can be anywhere in the worksheet.

Was it helpful?

Solution

This works for me.

Sub test()
    Set INFO = Cells.Find(What:="endofsample", After:=ActiveCell, LookIn:=xlFormulas, _
            LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
            MatchCase:=False)
    If INFO Is Nothing Then
    Else
    End If

    INFO.Select
    Range("A8", ActiveCell).Select
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top