I found this link and code that will do it if a single term is listed, but I want to list a handful of them. If the row contains any of the phrases, I would like to highlight it so I can later sort them to the top or bottom of the list OR if it's easier, copy them to another sheet in the document.
Selecting all cells with specific text
Selecting all cells with specific text
VBA Code:
Sub test()
Dim c As Range, FoundCells As Range
Dim firstaddress As String
Application.ScreenUpdating = False
With Sheets("Sheet1")
'find first cell that contains "rec"
Set c = .Cells.Find(What:="rec", After:=.Cells(Rows.Count, 1), LookIn:=xlValues, LookAt:= _
xlPart, MatchCase:=False)
'if the search returns a cell
If Not c Is Nothing Then
'note the address of first cell found
firstaddress = c.Address
Do
'FoundCells is the variable that will refer to all of the
'cells that are returned in the search
If FoundCells Is Nothing Then
Set FoundCells = c
Else
Set FoundCells = Union(c, FoundCells)
End If
'find the next instance of "rec"
Set c = .Cells.FindNext(c)
Loop While Not c Is Nothing And firstaddress <> c.Address
'after entire sheet searched, select all found cells
FoundCells.Select
Else
'if no cells were found in search, display msg
MsgBox "No cells found."
End If
End With
Application.ScreenUpdating = True
End Sub