Hi..
Try this..
The results are highlighted red in Sheet 1 and also copied to Sheet2..
Option Compare Text
Private Sub CommandButton1_Click()
Dim r As Range
Dim LR As Long
Application.ScreenUpdating = False
With CreateObject("VBScript.RegExp")
.IgnoreCase = True
.Pattern = "\b(Aklan|Antique|Capiz|Iloilo|Negros Occidental|Ormoc, Leyte|Coron, Palawan)\b"
For Each r In Range(Cells(1, 2), Cells(Rows.Count, 2).End(xlUp))
If .test(r.Value) = True Then
LR = Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row + 1
Cells(r.Row, 1).EntireRow.Interior.ColorIndex = 3
Cells(r.Row, 2).Copy Destination:=Sheets("Sheet2").Range("A" & LR)
End If
Next r
End With
Sheets("Sheet2").Columns.AutoFit
Application.ScreenUpdating = True
End Sub
Bookmarks