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".
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?
I suppose I can add a lot of "if or"s, but that isn't fun.
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" & 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 > 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