the following example returns all cells with the required value.
Tom
Sub Find()
Dim r As Range
Dim strFind As String
Dim strAddress As String
strFind = "Hello"
With ActiveSheet
Set r = .Cells.Find(strFind)
If Not r Is Nothing Then
strAddress = r.Address
Do
MsgBox r.Address
Set r = Cells.FindNext(r)
Loop While Not r Is Nothing And r.Address <> strAddress
Else
MsgBox "Not found"
End If
End With
End Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.