Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Sean Anderson   on Aug 19 In MS Office Category.

  
Question Answered By: Corinne Rogers   on Aug 19

Try this:

Sub test()
Dim FirstAddress, c As Range
With Worksheets(1).Range("a1:a500") 'Searches Column A, rows 1-500
Set c = .Find("2", LookIn:=xlValues, Lookat:=xlWhole) '(looks for
"2")
If Not c Is Nothing Then
FirstAddress = c.Address
Do
MsgBox c.Address & ": " & c.Value & " Row: " & c.Row & "
Col: " & c.Column
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> FirstAddress
End If
End With

End Sub

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on seeking the word or integer word Or get search suggestion and latest updates.


Tagged: