Thread: VBA searching
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
kirkm[_6_] kirkm[_6_] is offline
external usenet poster
 
Posts: 156
Default VBA searching

On Thu, 14 Sep 2006 12:48:07 +0100, "Bob Phillips"
wrote:

Dim iRow As Long
With Worksheets("Sheet2") '<=== change to suit
On Error Resume Next
iRow = .Evaluate("Match(""HelloFred"",'" & .Name & "'!B1:B100&" & _
"'" & .Name & "'!C1:C100, 0)")
On Error GoTo 0
If iRow 0 Then
MsgBox "Found in Row " & iRow
End If
End With


Hi Bob, Can this be modified to work it's way through the spreadsheet
so each occurance of "Hello Fred" is displayed?
The aim later would be to build an array holding this data.

Thanks - Kirk