Multiple search and copy
Sub finddate()
SearchCol = "A"
words = Array("Chat", "Face*", "Bebo*")
With Sheets("Sheet1")
For Each phrase In words
If Right(phrase, 1) = "*" Then
Set c = Columns(SearchCol & ":" & SearchCol). _
Find(what:=phrase, LookIn:=xlValues, _
lookat:=xlPart)
Else
Set c = Columns(SearchCol & ":" & SearchCol). _
Find(what:=phrase, LookIn:=xlValues, _
lookat:=xlWhole)
End If
If Not c Is Nothing Then
With Sheets("Sheet2")
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
c.EntireRow.Copy _
Destination:=.Rows(LastRow)
End With
End If
Next phrase
End With
End Sub
"BC" wrote:
I am looking to find instances of words within a url that is in a column.
Then select the rows that contain any words from a list and then copy those
selected rows to a second sheet.
I would like to be able to add words and use regular expressions for some
words.
EG
I would like to find the following
Chat
Face*
Bebo*
Any help would be most appreciated.
|