title: How to sift through a filtered range to see if any cells contain certain text
body: <p>Every part of my code works thus far, I just want to edit one part. I have my macro searching through a filtered range to see if it contains "CHECKED IN" and "CHECKED OUT". </p>
  
  <p>However I want to add many more words to check for. Is there any way I can change this code to perhaps make an array of strings that each cell is searched for? </p>
  
  <p>I suppose I can add a lot of "if or"s, but that isn't fun.</p>
  
  <pre><code>Sub checkk()
  Dim cl As Range, rng As Range
  Dim LastRow As Long
  Dim celltxt As String
  Dim i As Integer
  
  i = 1
  
  With ActiveSheet
      LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
  End With
  
  Set rng = Range("A1:A" &amp; LastRow)
  
  For Each cl In rng.SpecialCells(xlCellTypeVisible)
  cl.Select
  celltxt = ActiveCell.Text
  If InStr(1, celltxt, "CHECKED OUT") Or InStr(1, celltxt, "CHECKED IN") Then
  MsgBox ("found it")
  else
  MsgBox ("no")
  End If
  
  
  
  Next cl
  
  If i &gt; 1 Then
  MsgBox ("Looks like you have to do some more filtering, sort column A by 
  color to see what was tagged")
  
  End If
  
  
  End Sub
  </code></pre>